On 22.04.2013 18:45, Simon Riggs wrote:
On 22 April 2013 16:09, Shaun Thomas<stho...@optionshouse.com>  wrote:
On 04/22/2013 02:58 AM, Simon Riggs wrote:

So, to initiate promotion, you can create a file called
$DATADIR/fast_promote or $DATADIR/promote

Pardon my naiveté, but could it also be an option to read the method from
the promotion file?

echo "slow">  /my/promotion/path

That would work without any default naming scheme, and only incurs a read on
the file-handle.

Yeah, that would be one way to do it.

There's a little race condition if you create the file like above; postgres might read it just when it's created, but before the "slow" word has been written to it. But that would probably be acceptable, and an application could always do create and write the file and then rename it into place, if that's a problem.

We could do that and a similar mechanism existed in pg_standby, but
was removed in 9.0.

That code is still in pg_standby. Maybe you were thinking of some other feature?

- Heikki

Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:

Reply via email to