New trigger file in pg_standby to promote the standby to the primary

From: "Fujii Masao" <masao(dot)fujii(at)gmail(dot)com>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: New trigger file in pg_standby to promote the standby to the primary
Date: 2008-11-25 15:03:36
Message-ID: 3f0b79eb0811250703o2332d151lab02c423024f88dd@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

In current pg_standby, the presence of the trigger file causes
recovery to end whether or not the next WAL file is available.
Thereby, some transactions in the available WAL files will be
lost. So, we cannot use this trigger file to promote the standby
to the primary.

I'd like to add new trigger file option into pg_standby, and end
recovery after redoing all the available WAL files. Concretely
speaking, I would always make pg_standby look for the trigger
file after trying to restore the WAL file once. If the trigger file
is present, pg_standby exits immediately without deleting the
trigger file. Subsequent pg_standby uses the existing trigger
file.

This option is also useful for warm-standby.

Any comments welcome!

Regards,

--
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2008-11-25 15:17:05 Re: Brittleness in regression test setup
Previous Message Tom Lane 2008-11-25 14:42:57 Re: Exporting PGINTERVALSTYLE prevents access to older server versions