Re: WIP: Failover Slots - Mailing list pgsql-hackers

From Craig Ringer
Subject Re: WIP: Failover Slots
Date
Msg-id CAMsr+YFXqkAUVF8p6KxkYX1thAddWifm5SeW_8xTJJF8wtC4PA@mail.gmail.com
Whole thread Raw
In response to Re: WIP: Failover Slots  (Andres Freund <andres@anarazel.de>)
Responses Re: WIP: Failover Slots
List pgsql-hackers
On 23 January 2016 at 00:51, Andres Freund <andres@anarazel.de> wrote:
 
Not propagating them through the WAL also has the rather large advantage
of not barring the way to using such slots on standbys.

Yeah. So you could have a read-replica that has a slot and it has child nodes you can fail over to, but you don't have to have the slot on the master.

I don't personally find that to be a particularly compelling thing that says "we must have this" ... but maybe I'm not seeing the full significance/advantages.
 
I think it's technically quite possible to maintain the required
resources on multiple nodes. The question is how would you configure on
which nodes the resources need to be maintained? I can't come up with a
satisfying scheme...

That's part of it. Also the mechanism by which we actually replicate them - protocol additions for the walsender protocol, how to reliably send something that doesn't have an LSN, etc. It might be fairly simple, I haven't thought about it deeply, but I'd rather not go there until the basics are in place.

BTW, I'm keeping a working tree at https://github.com/2ndQuadrant/postgres/tree/dev/failover-slots . Subject to rebasing, history not clean. It has a test script in it that'll go away before patch posting.

Current state needs work to ensure that on-disk and in-memory representations are kept in sync, but is getting there.



--
 Craig Ringer                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services

pgsql-hackers by date:

Previous
From: Vladimir Sitnikov
Date:
Subject: Re: Set search_path + server-prepared statements = cached plan must not change result type
Next
From: Tom Lane
Date:
Subject: Re: 2016-01 Commitfest