pgsql: Add recovery_end_command option to recovery.conf.

Lists: pgsql-committerspgsql-hackers
From: heikki(at)postgresql(dot)org (Heikki Linnakangas)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Add recovery_end_command option to recovery.conf.
Date: 2009-05-14 20:31:09
Message-ID: 20090514203109.8EBA2754067@cvs.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

Log Message:
-----------
Add recovery_end_command option to recovery.conf. recovery_end_command
is run at the end of archive recovery, providing a chance to do external
cleanup. Modify pg_standby so that it no longer removes the trigger file,
that is to be done using the recovery_end_command now.

Provide a "smart" failover mode in pg_standby, where we don't fail over
immediately, but only after recovering all unapplied WAL from the archive.
That gives you zero data loss assuming all WAL was archived before
failover, which is what most users of pg_standby actually want.

recovery_end_command by Simon Riggs, pg_standby changes by Fujii Masao and
myself.

Modified Files:
--------------
pgsql/src/backend/access/transam:
xlog.c (r1.337 -> r1.338)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/transam/xlog.c?r1=1.337&r2=1.338)
pgsql/contrib/pg_standby:
pg_standby.c (r1.21 -> r1.22)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/contrib/pg_standby/pg_standby.c?r1=1.21&r2=1.22)
pgsql/doc/src/sgml:
backup.sgml (r2.125 -> r2.126)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/backup.sgml?r1=2.125&r2=2.126)
pgstandby.sgml (r2.7 -> r2.8)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/pgstandby.sgml?r1=2.7&r2=2.8)


From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Heikki Linnakangas <heikki(at)postgresql(dot)org>
Cc: pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Add recovery_end_command option to recovery.conf.
Date: 2009-05-14 20:39:01
Message-ID: 20090514203901.GP5986@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

Heikki Linnakangas wrote:
> Log Message:
> -----------
> Add recovery_end_command option to recovery.conf. recovery_end_command
> is run at the end of archive recovery, providing a chance to do external
> cleanup. Modify pg_standby so that it no longer removes the trigger file,
> that is to be done using the recovery_end_command now.

I think it's worth documenting this stuff in the release notes so that
it shows up for the next beta ...

--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Add recovery_end_command option to recovery.conf.
Date: 2009-05-14 21:02:01
Message-ID: 4A0C86C9.9020000@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

Alvaro Herrera wrote:
> Heikki Linnakangas wrote:
>> Log Message:
>> -----------
>> Add recovery_end_command option to recovery.conf. recovery_end_command
>> is run at the end of archive recovery, providing a chance to do external
>> cleanup. Modify pg_standby so that it no longer removes the trigger file,
>> that is to be done using the recovery_end_command now.
>
> I think it's worth documenting this stuff in the release notes so that
> it shows up for the next beta ...

Done.

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-hackers(at)postgresql(dot)org
Cc: Heikki Linnakangas <heikki(at)postgresql(dot)org>, pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Add recovery_end_command option to recovery.conf.
Date: 2009-05-14 21:04:15
Message-ID: 20348.1242335055@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> Heikki Linnakangas wrote:
>> Log Message:
>> -----------
>> Add recovery_end_command option to recovery.conf. recovery_end_command
>> is run at the end of archive recovery, providing a chance to do external
>> cleanup. Modify pg_standby so that it no longer removes the trigger file,
>> that is to be done using the recovery_end_command now.

> I think it's worth documenting this stuff in the release notes so that
> it shows up for the next beta ...

Yeah, on it now. Good work getting the patch in!

regards, tom lane


From: Jaime Casanova <jcasanov(at)systemguards(dot)com(dot)ec>
To: Heikki Linnakangas <heikki(at)postgresql(dot)org>
Cc: pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Add recovery_end_command option to recovery.conf.
Date: 2009-05-14 21:20:51
Message-ID: 3073cc9b0905141420m1a4198ffwe938140dc201550@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

On Thu, May 14, 2009 at 3:31 PM, Heikki Linnakangas
<heikki(at)postgresql(dot)org> wrote:
> Log Message:
> -----------
> Add recovery_end_command option to recovery.conf. recovery_end_command
> is run at the end of archive recovery, providing a chance to do external
> cleanup. Modify pg_standby so that it no longer removes the trigger file,
> that is to be done using the recovery_end_command now.
>

maybe we want to update share/recovery.conf.sample too?

--
Atentamente,
Jaime Casanova
Soporte y capacitación de PostgreSQL
Asesoría y desarrollo de sistemas
Guayaquil - Ecuador
Cel. +59387171157


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-hackers(at)postgresql(dot)org
Cc: Heikki Linnakangas <heikki(at)postgresql(dot)org>, pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Add recovery_end_command option to recovery.conf.
Date: 2009-05-14 22:22:28
Message-ID: 2455.1242339748@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

Jaime Casanova <jcasanov(at)systemguards(dot)com(dot)ec> writes:
> maybe we want to update share/recovery.conf.sample too?

Good catch, done.

regards, tom lane


From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org, pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Add recovery_end_command option to recovery.conf.
Date: 2009-05-15 06:06:48
Message-ID: 4A0D0678.40001@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

Tom Lane wrote:
> Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
>> Heikki Linnakangas wrote:
>>> Log Message:
>>> -----------
>>> Add recovery_end_command option to recovery.conf. recovery_end_command
>>> is run at the end of archive recovery, providing a chance to do external
>>> cleanup. Modify pg_standby so that it no longer removes the trigger file,
>>> that is to be done using the recovery_end_command now.
>
>> I think it's worth documenting this stuff in the release notes so that
>> it shows up for the next beta ...
>
> Yeah, on it now. Good work getting the patch in!

Albeit a bit hasty. Thanks for the cleanups.

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com