Re: Requested WAL segment xxx has already been removed - Mailing list pgsql-hackers

From Alexander Kukushkin
Subject Re: Requested WAL segment xxx has already been removed
Date
Msg-id CAFh8B=m=Wr5CmqXCwsdzP3HqFpW6k5ymcVVKi7XiZrLny7qg0w@mail.gmail.com
Whole thread Raw
In response to Requested WAL segment xxx has already been removed  (Japin Li <japinli@hotmail.com>)
List pgsql-hackers


On Mon, 14 Jul 2025 at 10:08, Japin Li <japinli@hotmail.com> wrote:

Hi all,

I recently hit an error with our streaming replication setup:

  2025-07-14 11:52:59.361 CST,"replicator","",728458,"10.9.9.74:35724",68747f1b.b1d8a,1,"START_REPLICATION",2025-07-14 11:52:59 CST,3/0,0,ERROR,58P01,"requested WAL segment 00000001000000000000000C has already been removed",,,,,,"START_REPLICATION 0/C000000 TIMELINE 1",,,"standby","walsender",,0

My question is: Can we make the primary automatically search the archive if
restore_command is set?

If we talk about physical replication, then with the same success restore_command could be (and more important, it should be) used on a standby. And the main question here is why standby wasn't properly configured?

However, with logical replication it is a different story, and it would be really great if restore_command is used when WAL's are missing to fetch it.
 
Regards,
--
Alexander Kukushkin

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: The same 2PC data maybe recovered twice
Next
From: jian he
Date:
Subject: domain check constraint should also consider domain's collation