Re-Sync Stand By Server - Mailing list pgsql-sql

From Adam Cornett
Subject Re-Sync Stand By Server
Date
Msg-id CAB5sPxbNq25Ta4Hs3E8RLMRy=j7wGuwJ=Pb4-bRJC9bhHjKZZA@mail.gmail.com
Whole thread Raw
List pgsql-sql
I have 2 identical machines, (Ubuntu 10.04 LTS running 9.1.2 from Martin Pitt's PPA) setup with streaming asynchronous replication.
Recently I had to take the standby down for some extended maintenance, and when it came back up it was waiting for a WAL segment that had since been removed from the primary.  I then shutdown the server, took a new base backup of the primary and copied it over (as per the directions in the streaming wiki) and cleared out the wal segments in the pg_xlog directory of the standby and tried to start it again, but now its not accepting connections and is looking for that wal file in the startup process:

postgres 10090 10089  0 12:38 ?        00:00:00 postgres: startup process   waiting for 0000000100000052000000E9

However, segment 52000000E9 is no longer on the primary, which is about a week ahead:

postgres@pg1:~$  psql -c "SELECT pg_current_xlog_location()"
 pg_current_xlog_location 
--------------------------
 58/8E1B8D98

So, how do I get the standby to catch up to "catch up" to the primary?

-Adam Cornett

pgsql-sql by date:

Previous
From: Julien Rouhaud
Date:
Subject: Re: [ADMIN] pg_dump : no tables were found.
Next
From: Carlos Mennens
Date:
Subject: Type Ahead Issue