Re: Latches, signals, and waiting

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Latches, signals, and waiting
Date: 2010-09-16 04:23:19
Message-ID: AANLkTimAtvRDJH6TdrCsh_CW6S+__MwBx35yvwdLi0+u@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On Wed, Sep 15, 2010 at 11:14 PM, Heikki Linnakangas
<heikki(dot)linnakangas(at)enterprisedb(dot)com> wrote:
>> (One issue is that it's not clear what that'd translate to on Windows.)
>
> pg_ctl failover ? At the moment, the location of the trigger file is
> configurable, but if we accept a constant location like "$PGDATA/failover"
> pg_ctl could do the whole thing, create the file and send signal. pg_ctl on
> Window already knows how to send the "signal" via the named pipe signal
> emulation.

Right.

> Fujii-san suggested that we might have a user-defined function for
> triggering failover as well.

The attached patch introduces such a user-defined function. This is
useful especially when clusterware like pgpool-II is located in remote
server since it can trigger failover without using something like ssh.

> That's also handy, but it's not a replacement
> because it only works in hot standby mode.

Yep.

And we should increase the sleep time in walsender's poll loop (i.e.,
increase the default value of wal_sender_delay) too? Currently it's
very small, 200ms.

Regards,

--
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center

Attachment Content-Type Size
pg_trigger_failover_v1.patch application/octet-stream 10.3 KB

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Fujii Masao 2010-09-16 04:47:52 Re: Latches, signals, and waiting
Previous Message Tom Lane 2010-09-16 02:54:07 pgsql: Fix two new-in-9.0 bugs in hstore.

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii Masao 2010-09-16 04:47:52 Re: Latches, signals, and waiting
Previous Message Robert Haas 2010-09-16 02:32:38 Re: RelationCreateStorage can orphan files