Re: How to reliably detect if it's a promoting standby

Поиск
Список
Период
Сортировка
От Tatsuo Ishii
Тема Re: How to reliably detect if it's a promoting standby
Дата
Msg-id 20101015.001701.597966886238392734.t-ishii@sraoss.co.jp
обсуждение исходный текст
Ответ на Re: How to reliably detect if it's a promoting standby  (Itagaki Takahiro <itagaki.takahiro@gmail.com>)
Список pgsql-hackers
> On Thu, Oct 14, 2010 at 11:10 AM, Tatsuo Ishii <ishii@postgresql.org> wrote:
>> Ok, it seems impossible to do that by using any public interfaces
>> currently available in PostgreSQL 9.0. I will create a custom C
>> function to be distributed along with pgpool-II.
> 
> Could you submit the function for 9.1? Thanks :-)

I can't wait till 9.1 since pgpool-II needs it now. Of course I could
propose a patch against HEAD when I have enough time...

BTW, I have checked xlog.c etc. and probably the only way to know if
the standby is promoting is, to see if ShutdownWalRcv() is called. If
it's called, global variable WalRcvData->walRcvsState is set to other
than WALRCV_RUNNING, I think.
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese: http://www.sraoss.co.jp


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Dimitri Fontaine
Дата:
Сообщение: Re: SQL command to edit postgresql.conf, with comments
Следующее
От: Brendan Jurd
Дата:
Сообщение: Re: Docs for archive_cleanup_command are poor