WIP: Failover Slots - Mailing list pgsql-hackers

From Simon Riggs
Subject WIP: Failover Slots
Date
Msg-id CANP8+j+qu7NV6QyaN4QgHo9kCD9fg0HhbwFFLpRuFA_6niXZ9g@mail.gmail.com
Whole thread Raw
Responses Re: WIP: Failover Slots
Re: WIP: Failover Slots
List pgsql-hackers

Failover Slots

If Logical Decoding is taking place from a master, then if we failover and create a new master we would like to continue the Logical Decoding from the new master. To facilitate this, we introduce the concept of “Failover Slots”, which are slots that generate WAL, so that any downstream standby can continue to produce logical decoding output from that named plugin.

In the current patch, any slot defined on a master will generate WAL, leading to a pending-slot being present on all standby nodes. When a standby is promoted, the slot becomes usable and will have the properties as of the last fsync on the master. 

Failover slots are not accessible until promotion of the standby. Logical slots from a standby looks like a significant step beyond this and will not be part of this patch.

Internal design is fairly clear, using a new rmgr. No real problems emerged so far.

Patch is WIP, posted for comment, so you can see where I'm going. 

I'm expecting to have a working version including timeline following for 9.6.


--
Simon Riggs                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Attachment

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Keyword classifications
Next
From: Noah Misch
Date:
Subject: Re: Fwd: Core dump with nested CREATE TEMP TABLE