Re: How to reliably detect if it's a promoting standby - Mailing list pgsql-hackers

From Tatsuo Ishii
Subject Re: How to reliably detect if it's a promoting standby
Date
Msg-id 20101014.111014.547722164751445880.t-ishii@sraoss.co.jp
Whole thread Raw
In response to How to reliably detect if it's a promoting standby  (Tatsuo Ishii <ishii@postgresql.org>)
Responses Re: How to reliably detect if it's a promoting standby
Re: How to reliably detect if it's a promoting standby
List pgsql-hackers
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.
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese: http://www.sraoss.co.jp

> Hi,
> 
> I'm looking for a way to reliably detect if it's a promoting
> standby. This is neccessary for pgpool-II manage streaming replication
> clusters. When primary goes down, standby *could* start promoting to
> primary. The only way to find it is calling
> pg_is_in_recovery(). Problem is, it returns true even if standby is
> promoting. If pgpool-II waits for cetain period, it may finishes
> promotion, thus it returns false. But how long should we wait?
> 
> Any idea?
> --
> Tatsuo Ishii
> SRA OSS, Inc. Japan
> English: http://www.sraoss.co.jp/index_en.php
> Japanese: http://www.sraoss.co.jp
> 
> -- 
> Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: wip: functions median and percentile
Next
From: Alastair Turner
Date:
Subject: First patch proposal