From: | Heikki Linnakangas <hlinnakangas(at)vmware(dot)com> |
---|---|
To: | Simon Riggs <simon(at)2ndQuadrant(dot)com> |
Cc: | sthomas(at)optionshouse(dot)com, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Fast promotion, loose ends |
Date: | 2013-04-22 18:04:39 |
Message-ID: | 51757BB7.9030306@vmware.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 22.04.2013 18:45, Simon Riggs wrote:
> On 22 April 2013 16:09, Shaun Thomas<sthomas(at)optionshouse(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Florian Pflug | 2013-04-22 18:04:47 | Re: Enabling Checksums |
Previous Message | Josh Berkus | 2013-04-22 18:00:43 | Re: Enabling Checksums |