From: | Juraj Fabo <juraj(dot)fabo(at)gmail(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Why is pg_xlog/archive_status of HotStandby synced with master? |
Date: | 2013-03-22 11:58:15 |
Message-ID: | CAAqVCyS0mjNiN7bEu_EzV-=eoDZXZAqjhTdqCyMKRuiO-pmYvg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi
I have SLES 11 SP2 in virtual boxes with postgres 9.2.2.
My target is to have Master /Hotstandby (HS) with streaming replication
(SR) managed with corosync/pacemaker beside also regular archivation of
database.
I started with testing of archivation and replication I noticed that
pg_xlog/archive_status is being updated on HS when it is updated on Master,
however, even if the HS does NOT do any archivation.
Archive command on master:
archive_command = 'cp %p /var/lib/pgsql/data/archive/%f'
SR is working properly, when I make inserts on Master DB I get proper
select results on HS.
However, while I see growing content of Masters /var/lib/pgsql/data/archive
and Masters /var/lib/pgsql/data/pg_xlog/archive_status/ respectively on the
HS only the /var/lib/pgsql/data/pg_xlog/archive_status/ is updated.
I would like to ask for advise on how to understand the content of
archive_status. I considered to be indicator of already archived WALs , but
obviously on HS it is not that case.
In case of my master termination its archive will be no longer available
and on the exHS which is promoted to new Master, the new Master archive
will miss data archived on exMaster.
At least my tests showed, that even manually clearing HS
pg_xlog/archive_status/ just before its promotion does not lead to
archivation of not-yet-archived-wals on exHS/newMaster.
I think that an option would be to make a new base backup on each
promotion/failure, but then I do not see much reason for archivation
command on Master.
Then again, archive command using rsync to archive on HS would be kind of
overhead, since the information it would transfer is already being
transfered via SR, isn't it?
Thank you in advance for hints.
Best regards
Juraj
From | Date | Subject | |
---|---|---|---|
Next Message | Bertrand Janin | 2013-03-22 12:32:54 | Rewritten rows on unchanged values |
Previous Message | wd | 2013-03-22 11:04:04 | Re: streaming replication question |