Re: New trigger option of pg_standby - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: New trigger option of pg_standby
Date
Msg-id 1240311836.23905.206.camel@ebony.fara.com
Whole thread Raw
In response to Re: New trigger option of pg_standby  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Responses Re: New trigger option of pg_standby  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
List pgsql-hackers
On Mon, 2009-04-20 at 17:47 +0300, Heikki Linnakangas wrote:

> At the end of archive recovery, the server always probes for the 
> timeline by requesting history files until it fails to find one. That 
> probing should remove the trigger file if it hasn't been removed by 
> then. It's a bit coincidental to rely on that, but at least it's simple. 
> The assumption we're making is that the server won't exit recovery 
> before asking restore_command for a file that doesn't exist.

If you really want to simplify this, then we should have a final_command
parameter for a command to be executed at the end of recovery. That
would make the change to pg_standby very simple and allow for a very
simple final_command also. That would make the logic similar to what we
do for aggregates: transition function and final function. 

We could call it restore_cleanup_command or something similar.

I suspect this option will make you consider Fujii-san's patch in a
better light. :-)

-- Simon Riggs           www.2ndQuadrant.comPostgreSQL Training, Services and Support



pgsql-hackers by date:

Previous
From: Abhijit Menon-Sen
Date:
Subject: Re: [PATCH] Add a test for pg_get_functiondef()
Next
From: Heikki Linnakangas
Date:
Subject: Re: New trigger option of pg_standby