Re: logical decoding and replication of sequences

Petr Jelinek <petr.jelinek@enterprisedb.com>

From: Petr Jelinek <petr.jelinek@enterprisedb.com>
To: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Cc: Tomas Vondra <tomas.vondra@enterprisedb.com>, Hannu Krosing <hannuk@google.com>, vignesh C <vignesh21@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2021-11-22T16:01:46Z
Lists: pgsql-hackers
> On 22. 11. 2021, at 16:44, Peter Eisentraut <peter.eisentraut@enterprisedb.com> wrote:
> 
> On 22.11.21 01:47, Tomas Vondra wrote:
>> So I think just decoding the sequence tuples is a better solution - for large transactions (consuming many values from the sequence) it may be more expensive (i.e. send more records to replica). But I doubt that matters too much - it's likely negligible compared to other data for large transactions.
> 
> I agree that the original approach is better.  It was worth trying out this alternative, but it seems quite complicated.  I note that a lot of additional code had to be added around several areas of the code, whereas the original patch really just touched the logical decoding code, as it should.  This doesn't prevent anyone from attempting to optimize things somehow in the future, but for now let's move forward with the simple approach.

+1

--
Petr Jelinek




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.