Re: Standalone synchronous master - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Standalone synchronous master
Date
Msg-id CA+TgmoZHTdnUdXp1eka8grjFibXdGisptmjc5KOOUZQwC7_wkQ@mail.gmail.com
Whole thread Raw
In response to Re: Standalone synchronous master  (Aidan Van Dyk <aidan@highrise.ca>)
List pgsql-hackers
On Wed, Jan 4, 2012 at 9:28 AM, Aidan Van Dyk <aidan@highrise.ca> wrote:
> I'ld love a "hook" script that was run if sync-rep state ever changed
> (heck, I'ld even like it if it just choose a new sync standby).

That seems useful.  I don't think the current code quite knows its own
state; we seem to have each walsender recompute who the boss is, and
if you query pg_stat_replication that redoes the same calculation.  I
can't shake the feeling that there's a better way... which would also
facilitate this.

> Even better, is there a way we could start injecting "notify" events
> into the cluster on these types of changes?  Especially now that
> notify events can take payloads, it means I don't have to keep
> constantly polling the database to see if it things its connected,
> etc.

I like this idea, too.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Regarding Checkpoint Redo Record
Next
From: Tom Lane
Date:
Subject: pg_restore direct to database is broken for --insert dumps