Re: Fast promotion, loose ends

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: Fast promotion, loose ends
Дата
Msg-id 51757BB7.9030306@vmware.com
обсуждение исходный текст
Ответ на Re: Fast promotion, loose ends  (Simon Riggs <simon@2ndQuadrant.com>)
Ответы Re: Fast promotion, loose ends  (Simon Riggs <simon@2ndQuadrant.com>)
Список 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 по дате отправления:

Предыдущее
От: Josh Berkus
Дата:
Сообщение: Re: Enabling Checksums
Следующее
От: Florian Pflug
Дата:
Сообщение: Re: Enabling Checksums