Re: PostgreSQL 9.2 archiving last replayed WAL after recovery
От | Daniel Gomez Blanco |
---|---|
Тема | Re: PostgreSQL 9.2 archiving last replayed WAL after recovery |
Дата | |
Msg-id | CAL4HELckxNMotf3twq2ipVroqfQL1bUUrq+jky+T=a=_=4ZtYw@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: PostgreSQL 9.2 archiving last replayed WAL after recovery (amulsul <sul_amul@yahoo.co.in>) |
Ответы |
Re: PostgreSQL 9.2 archiving last replayed WAL after recovery
|
Список | pgsql-novice |
Hi Amul,
No, I didn't copy my postgres.conf from master to standby. This is always working on a single instance, archiving WAL files to be able to achieve backup and recovery.
The problem arises after recovery. We go back to a certain snapshot (created between pg_start_backup and pg_stop_backup as advised) and then start replaying logs. It reaches a consistent state after the pg_stop_backup point and all the rest of the logs are replayed, and recovery is successful. But after that, when the database starts up and starts recycling WAL files, it always archives the last replayed one, although that file was already archived and has changed because another timeline is started.
For the moment, I solved the problem modifying the archive_command to 'test -f /.../archive/%f || cp %p /.../archive/%f' so if the file exists it doesn't archive it. But that is not the recommended procedure in the documentation, where it says that a the archive command should fail if a fail is tried to be archived twice.
Cheers,
Daniel
On 18 July 2013 04:06, amulsul <sul_amul@yahoo.co.in> wrote:
Dear Daniel Blanco,
I think you copied same postgres.conf from master to standby, right?
if so please remove the following setting from standby before starting ithope it will work :D
wal_level = archive
archive_mode = on
archive_command = 'test ! -f /.../archive/%f && cp %p /.../archive/%f'
Regards,
Amul Sul
--
View this message in context: http://postgresql.1045698.n5.nabble.com/PostgreSQL-9-2-archiving-last-replayed-WAL-after-recovery-tp5763207p5764173.html
Sent from the PostgreSQL - novice mailing list archive at Nabble.com.
--
Sent via pgsql-novice mailing list (pgsql-novice@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-novice
В списке pgsql-novice по дате отправления: