Re: logical decoding and replication of sequences

From: Petr Jelinek <petr(dot)jelinek(at)enterprisedb(dot)com>
To: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
Cc: Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com>, Hannu Krosing <hannuk(at)google(dot)com>, vignesh C <vignesh21(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: logical decoding and replication of sequences
Date: 2021-11-22 16:01:46
Message-ID: F4958E74-645E-454A-B2C5-7DB53DDF31A8@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


> On 22. 11. 2021, at 16:44, Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2021-11-22 16:15:23 Re: Is a function to a 1-component record type undeclarable?
Previous Message Chapman Flack 2021-11-22 15:59:52 Is a function to a 1-component record type undeclarable?