pg_standby / WAL archive-restore through system restarts

From: David Wall <d(dot)wall(at)computer(dot)org>
To: pgsql-general(at)postgresql(dot)org
Subject: pg_standby / WAL archive-restore through system restarts
Date: 2008-05-12 15:51:58
Message-ID: 4828679E.1090304@computer.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Just wanted to see if others would confirm my impressions about running
WAL archiving and pg_standby restore.

Server A (Primary): Runs PG 8.3 with WAL archiving enabled. Each WAL is
copied over the network to Server B. (A previous 'tar backup' of the
database along with the requisite psql commands
pg_start_backup()/pg_stop_backup() was done and restored on Server B.)

Server B (Backup): Runs PG 8.3 in 'recovery mode' (recovery.conf), with
pg_standby feeding the WAL archives.

The idea is that if Server A dies, Server B will have a relatively close
snapshot of the most recent database changes and could take over as the
new primary database server.

During regular operations, Server A and Server B may independently need
to be rebooted or postgresql restarted, etc. Is there any sync-ing
between Server A and Server B I have to worry about when doing this?

That is, will Server B need to know anything about the fact that the
postmaster on Server A going up and down? Will it just run normally,
waiting for the restarted Server A to send over new WAL archives?

Can I shutdown Server B simply by killing the postmaster and restart it
back in recovery mode to continue re-syncing where it left off? Or does
stopping Server B in recovery mode require any manual re-sync steps
before it can resume recovery?

If I ever tell Server B to stop recovery (assuming I didn't intend for
it to become the new primary), I cannot just resume recovery mode unless
I do the full data backup again from Server A and restore on Server B in
start in recovery mode. That is, once you tell PG to end recovery, it
becomes a primary and no longer can resume recovery mode without redoing
the recovery setup steps.

Are these correct?

Thanks,
David

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Mathias Ghys 2008-05-12 17:28:20 problem with importing dbf file into postgresql using navicat on mac OS X
Previous Message Craig Vosburgh 2008-05-12 15:40:31 Re: Hung SQL Update Linux Redhat 4U5 Postgres 8.3.1