Re: Fast promotion, loose ends - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: Fast promotion, loose ends
Date
Msg-id 51757BB7.9030306@vmware.com
Whole thread Raw
In response to Re: Fast promotion, loose ends  (Simon Riggs <simon@2ndQuadrant.com>)
Responses Re: Fast promotion, loose ends
List pgsql-hackers
On 22.04.2013 18:45, Simon Riggs wrote:
> On 22 April 2013 16:09, Shaun Thomas<sthomas@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



pgsql-hackers by date:

Previous
From: Josh Berkus
Date:
Subject: Re: Enabling Checksums
Next
From: Florian Pflug
Date:
Subject: Re: Enabling Checksums