On Fri, Apr 2, 2010 at 2:22 AM, Robert Haas <robertmh...@gmail.com> wrote: > Can someone explain to me in plain language what problem this is > trying to fix? I'm having trouble figuring it out.
The problem is that pg_xlogfile_name(pg_last_xlog_receive_location()) and pg_xlogfile_name(pg_last_xlog_replay_location()) might report an inaccurate WAL file name because currently pg_xlogfile_name() always uses the current timeline to calculate the WAL file name. For example, even though the last applied WAL file is 000000010000000000000002, the standby wrongly reports that 000000000000000000000002 has been applied last. postgres=# SELECT l lsn, pg_xlogfile_name(l) filename FROM pg_last_xlog_replay_location() AS l; lsn | filename -----------+-------------------------- 0/200FF70 | 000000000000000000000002 (1 row) $ ls sby/pg_xlog/ 000000010000000000000002 000000010000000000000003 archive_status Regards, -- Fujii Masao NIPPON TELEGRAPH AND TELEPHONE CORPORATION NTT Open Source Software Center -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers