Re: logical decoding and replication of sequences

From: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
To: Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com>, Hannu Krosing <hannuk(at)google(dot)com>
Cc: vignesh C <vignesh21(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Petr Jelinek <petr(dot)jelinek(at)enterprisedb(dot)com>
Subject: Re: logical decoding and replication of sequences
Date: 2021-11-22 15:44:57
Message-ID: 962b9015-201c-9df6-d79e-8e6afad21a93@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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.

In response to

Responses

Browse pgsql-hackers by date

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