Re: Adding a range check on the sequence index from the publisher. - Mailing list pgsql-hackers

From Masahiko Sawada
Subject Re: Adding a range check on the sequence index from the publisher.
Date
Msg-id CAD21AoBu4ki-_gqVCPffc4bwjQjN2NFnS2z9-iks3Mesvz3wrw@mail.gmail.com
Whole thread
In response to Re: Adding a range check on the sequence index from the publisher.  (Amit Kapila <amit.kapila16@gmail.com>)
List pgsql-hackers
On Mon, Sep 21, 2026 at 9:10 PM Amit Kapila <amit.kapila16@gmail.com> wrote:
>
> On Tue, Sep 22, 2026 at 1:22 AM Masahiko Sawada <sawada.mshk@gmail.com> wrote:
> >
> > I've attached the patch to fix it. Feedback is very welcome.
> >
>
> Thanks, fix LGTM. BTW, on similar lines, we can change seqRow[0] to
> INT4OID from INT8OID in copy_sequences()[1]. Since
> libpqrcv_processTuples uses the declared type's input function, the
> value is parsed by int8in and then silently truncated to its low 32
> bits. This can be risky too.

Right. It doesn't actually lead to OOB writes so I was thinking of
fixing it in a separate patch. Having said that, it would be
reasonable to fix both at the same time.

Regards,

--
Masahiko Sawada
Amazon Web Services: https://aws.amazon.com



pgsql-hackers by date:

Previous
From: Masahiko Sawada
Date:
Subject: Re: Fix "unexpected logical decoding status change" error; from concurrent logical decoding activation
Next
From: Masahiko Sawada
Date:
Subject: Re: Adding a range check on the sequence index from the publisher.