Partial WAL file replay before fail-over startup

From: "Donald Fraser" <postgres(at)kiwi-fraser(dot)net>
To: "[ADMIN]" <pgsql-admin(at)postgresql(dot)org>
Subject: Partial WAL file replay before fail-over startup
Date: 2009-08-19 12:33:36
Message-ID: 4563B601613A434897E1D9DED0457EDC@DEVELOP1
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Our current standby server, on detection of fail-over, gets all archived WAL files including the most resent partial WAL file copied into the pg_xlog directory. We then start postgresql and wait for it to come up.

We would like to move over to the warm standby approach. However I would like to clarify how the very last, partially populated WAL file can be replayed into the warm standby server before startup?

I quote from the documents on "Record-based Log Shipping".

"Note that the standby servers' restore_command scripts still deal in whole WAL files, so the incrementally copied data is not ordinarily made available to the standby servers. It is of use only when the primary dies - then the last partial WAL file is fed to the standby before allowing it to come up."

It is not clear from this statement how the last partial WAL file is fed to the standby server if the restore_command only takes whole WAL files.

I would assume that copying the partial WAL file into the pg_xlog directory would suffice before startup. However as I've been caught out many times before with assumptions, I would therefore like to clarify this?

Regards
Donald Fraser

Browse pgsql-admin by date

  From Date Subject
Next Message Ygor Degani 2009-08-19 14:39:28 Duplicated keys in PITR
Previous Message Alvaro Herrera 2009-08-18 22:48:59 Re: vacuum full questions