Re: Standalone synchronous master

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Aidan Van Dyk <aidan(at)highrise(dot)ca>
Cc: Alexander Björnhagen <alex(dot)bjornhagen(at)gmail(dot)com>, Magnus Hagander <magnus(at)hagander(dot)net>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Standalone synchronous master
Date: 2012-01-04 18:04:26
Message-ID: CA+TgmoZHTdnUdXp1eka8grjFibXdGisptmjc5KOOUZQwC7_wkQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Jan 4, 2012 at 9:28 AM, Aidan Van Dyk <aidan(at)highrise(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2012-01-04 18:13:02 pg_restore direct to database is broken for --insert dumps
Previous Message Robert Haas 2012-01-04 18:00:06 Re: Regarding Checkpoint Redo Record