[PATCH] Logical decoding support for sequence advances - Mailing list pgsql-hackers

From Craig Ringer
Subject [PATCH] Logical decoding support for sequence advances
Date
Msg-id CAMsr+YGez7Wi+zjKPs2mtV1EzQa8oWu595esdveTkbshbQDWmw@mail.gmail.com
Whole thread Raw
Responses Re: [PATCH] Logical decoding support for sequence advances  (Craig Ringer <craig@2ndquadrant.com>)
List pgsql-hackers
Hi all

Attached is a patch against 9.6 to add support for informing logical decoding plugins of the new sequence last_value when sequence advance WAL records are processed during decoding.

The primary purpose is to make logical replication based failover practical in 9.6 by ensuring that the downstream's sequence positions are always ahead of the upstream's. It's replicating the crash-recovery sequence positions, basically.

This isn't as flexible as a full sequence access method but it's simple, unintrusive and it gets things done now.

test_decoding is updated to reflect the change and test the functionality. The large diff is mainly a result of that, since the output is a bit spammy. 

Pushed to https://github.com/2ndQuadrant/postgres/tree/dev/decode-sequences .

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

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Disabling an index temporarily
Next
From: Jeff Janes
Date:
Subject: Re: Using quicksort for every external sort run