Re: logical decoding and replication of sequences

Masahiko Sawada <sawada.mshk@gmail.com>

From: Masahiko Sawada <sawada.mshk@gmail.com>
To: Tomas Vondra <tomas.vondra@enterprisedb.com>
Cc: Petr Jelinek <petr.jelinek@enterprisedb.com>, Amit Kapila <amit.kapila16@gmail.com>, Peter Eisentraut <peter.eisentraut@enterprisedb.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2022-03-25T07:00:13Z
Lists: pgsql-hackers

Attachments

On Fri, Mar 25, 2022 at 6:59 AM Tomas Vondra
<tomas.vondra@enterprisedb.com> wrote:
>
> Hi,
>
> Pushed, after going through the patch once more, addressed the remaining
> FIXMEs, corrected a couple places in the docs and comments, etc. Minor
> tweaks, nothing important.
>

The commit updates tab-completion for ALTER PUBLICATION but seems not
to update for CREATE PUBLICATION. I've attached a patch for that.

Also, the commit add a new pgoutput option "sequences":

+                else if (strcmp(defel->defname, "sequences") == 0)
+                {
+                        if (sequences_option_given)
+                                ereport(ERROR,
+                                                (errcode(ERRCODE_SYNTAX_ERROR),
+                                                 errmsg("conflicting
or redundant options")));
+                        sequences_option_given = true;
+
+                        data->sequences = defGetBoolean(defel);
+                }

But as far as I read changes, there is no use of this option, and this
code is not tested. Can we remove it or is it for upcoming changes?

Regards,

-- 
Masahiko Sawada
EDB:  https://www.enterprisedb.com/

Commits

  1. Fix cache invalidation bug in recovery_prefetch.

  2. Revert "Logical decoding of sequences"

  3. Minor improvements in sequence decoding code and docs

  4. Handle sequences in preprocess_pubobj_list

  5. Update tab-completion for CREATE PUBLICATION with sequences

  6. Add decoding of sequences to built-in replication

  7. Stabilize test_decoding touching with sequences

  8. Call ReorderBufferProcessXid from sequence_decode

  9. Add decoding of sequences to test_decoding

  10. Replace Test::More plans with done_testing

  11. Logical decoding of sequences

  12. Respect permissions within logical replication.