Partial WAL file replay before fail-over startup

This is a multi-part message in MIME format.

------=_NextPart_000_002E_01CA20D1.A7C37A20
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

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
------=_NextPart_000_002E_01CA20D1.A7C37A20
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2900.5764" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV>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.</DIV>
<DIV><FONT size=3D2></FONT> </DIV>
<DIV>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?<BR></DIV>
<DIV>I quote from the documents on "Record-based Log =
Shipping".</DIV>
<DIV><FONT size=3D2></FONT><FONT size=3D2></FONT><FONT =
size=3D2></FONT><FONT
size=3D2></FONT><FONT size=3D2></FONT><FONT size=3D2></FONT><FONT =
size=3D2></FONT><FONT
size=3D2></FONT><FONT size=3D2></FONT><FONT size=3D2></FONT><FONT =
size=3D2></FONT><FONT
size=3D2></FONT><FONT size=3D2></FONT><BR>"Note that the standby =
servers' <FONT
face=3D"Courier New">restore_command</FONT> 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 =97 then the last =
partial WAL
file is fed to the standby before allowing it to come up."</DIV>
<DIV><FONT size=3D2></FONT> </DIV>
<DIV>It is not clear from this statement how the last partial WAL file =
is fed to
the standby server if the <FONT face=3D"Courier =
New">restore_command</FONT> only
takes whole WAL files.<BR></DIV>
<DIV>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?</DIV>
<DIV><FONT size=3D2></FONT><FONT size=3D2></FONT><FONT =
size=3D2></FONT><FONT
size=3D2></FONT><FONT size=3D2></FONT><FONT size=3D2></FONT><FONT
size=3D2></FONT><BR>Regards</DIV>
<DIV>Donald Fraser</DIV></BODY></HTML>

------=_NextPart_000_002E_01CA20D1.A7C37A20--
Donald Fraser [ Mi, 19 August 2009 14:33 ] [ ID #2012636 ]
Datenbanken » gmane.comp.db.postgresql.admin » Partial WAL file replay before fail-over startup

Vorheriges Thema: vacuum on empty table takes very long
Nächstes Thema: vacuum full questions