Re: Standalone synchronous master
Robert Haas <robertmhaas@gmail.com>
From: Robert Haas <robertmhaas@gmail.com>
To: Aidan Van Dyk <aidan@highrise.ca>
Cc: Alexander Björnhagen <alex.bjornhagen@gmail.com>, Magnus Hagander <magnus@hagander.net>, Fujii Masao <masao.fujii@gmail.com>, pgsql-hackers@postgresql.org
Date: 2012-01-04T18:04:26Z
Lists: 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