Re: logical decoding and replication of sequences, take 2
John Naylor <john.naylor@enterprisedb.com>
From: John Naylor <john.naylor@enterprisedb.com>
To: Tomas Vondra <tomas.vondra@enterprisedb.com>
Cc: 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-03-10T10:03:04Z
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
On Wed, Mar 1, 2023 at 1:02 AM Tomas Vondra <tomas.vondra@enterprisedb.com> wrote: > here's a rebased patch to make cfbot happy, dropping the first part that > is now unnecessary thanks to 7fe1aa991b. Hi Tomas, I'm looking into doing some "in situ" testing, but for now I'll mention some minor nits I found: 0001 + * so we simply do a lookup (the sequence is identified by relfilende). If relfilenode? Or should it be called a relfilelocator, which is the parameter type? I see some other references to relfilenode in comments and commit message, and I'm not sure which need to be updated. + /* XXX Maybe check that we're still in the same top-level xact? */ Any ideas on what should happen here? + /* XXX how could we have sequence change without data? */ + if(!datalen || !tupledata) + elog(ERROR, "sequence decode missing tuple data"); Since the ERROR is new based on feedback, we can get rid of XXX I think. More generally, I associate XXX comments to highlight problems or unpleasantness in the code that don't quite rise to the level of FIXME, but are perhaps more serious than "NB:", "Note:", or "Important:" + * When we're called via the SQL SRF there's already a transaction I see this was copied from existing code, but I found it confusing -- does this function have a stable name? + /* Only ever called from ReorderBufferApplySequence, so transational. */ Typo: transactional 0002 I see a few SERIAL types in the tests but no GENERATED ... AS IDENTITY -- not sure if it matters, but seems good for completeness. Reminder for later: Patches 0002 and 0003 still refer to 0da92dc530, which is a reverted commit -- I assume it intends to refer to the content of 0001? -- John Naylor EDB: http://www.enterprisedb.com