Re: logical decoding and replication of sequences, take 2
Tomas Vondra <tomas.vondra@enterprisedb.com>
From: Tomas Vondra <tomas.vondra@enterprisedb.com>
To: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Masahiko Sawada <sawada.mshk@gmail.com>,
Amit Kapila <amit.kapila16@gmail.com>,
John Naylor <john.naylor@enterprisedb.com>, vignesh C <vignesh21@gmail.com>,
Andres Freund <andres@anarazel.de>, Robert Haas <robertmhaas@gmail.com>,
PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>,
Heikki Linnakangas <heikki.linnakangas@iki.fi>
Date: 2023-04-05T21:26:33Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Migrate logical slots to the new node during an upgrade.
- 29d0a77fa660 17.0 cited
-
Make test_decoding ddl.out shorter
- d6677b93c79b 17.0 landed
- c5c5832600e9 14.9 landed
- b1dc946eee3d 16.0 landed
- 3bb8b9342f8a 15.4 landed
-
Fix snapshot handling in logicalmsg_decode
- 949ac32e1267 15.3 landed
- 8b9cbd42b61f 14.8 landed
- 4df581fa0f4b 13.11 landed
- 497f863f0598 12.15 landed
- 8de91ebf2ac1 11.20 landed
- 7fe1aa991b62 16.0 landed
-
doc: Adjust a few more references to "postmaster"
- 17e72ec45d31 16.0 cited
-
Revert "Logical decoding of sequences"
- 2c7ea57e56ca 15.0 cited
Attachments
- 0001-Logical-decoding-of-sequences-20230405.patch (text/x-patch) patch 0001
- 0002-make-test_decoding-ddl.out-shorter-20230405.patch (text/x-patch) patch 0002
- 0003-Add-decoding-of-sequences-to-test_decoding-20230405.patch (text/x-patch) patch 0003
- 0004-Add-decoding-of-sequences-to-built-in-repli-20230405.patch (text/x-patch) patch 0004
- 0005-add-interlock-with-ALTER-SEQUENCE-20230405.patch (text/x-patch) patch 0005
- 0006-Support-LOCK-for-sequences-instead-of-funct-20230405.patch (text/x-patch) patch 0006
- 0007-Reconstruct-the-right-state-from-the-on-dis-20230405.patch (text/x-patch) patch 0007
- 0008-protocol-changes-20230405.patch (text/x-patch) patch 0008
On 4/5/23 12:39, Alvaro Herrera wrote: > Patch 0002 is very annoying to scroll, and I realized that it's because > psql is writing 200kB of dashes in one of the test_decoding test cases. > I propose to set psql's printing format to 'unaligned' to avoid that, > which should cut the size of that patch to a tenth. > Yeah, that's a good idea, I think. It shrunk the diff to ~90kB, which is much better. > I wonder if there's a similar issue in 0003, but I didn't check. > I don't think so, there just seems to be enough code changes to generate ~260kB diff with all the context. As for the cfbot failures reported by Greg, that turned out to be a minor thinko in the protocol version negotiation, introduced by part 0008 (current part, after adding Alvaro's patch tweaking test output). The subscriber failed to send 'sequences on' when starting the stream. It also forgot to refresh the subscription after a sequence was added. The attached patch version fixes all of this, but I think at this point it's better to just postpone this for PG17 - if it was something we could fix within a single release, maybe. But the replication protocol is something we can't easily change after release, so if we find out the versioning (and sequence negotiation) should work differently, we can't change it. In fact, we'd be probably stuck with it until PG16 gets out of support, not just until PG17 ... I've thought about pushing at least the first two parts (adding the sequence decoding infrastructure and test_decoding support), but I'm not sure that's quite worth it without the built-in replication stuff. Or we could push it and then tweak it after feature freeze, if we conclude the protocol versioning should work differently. I recall we did changes in the column and row filtering in PG15. But that seems quite wrong, obviously. regards -- Tomas Vondra EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company