public inbox for [email protected]
help / color / mirror / Atom feedFrom: Никита Калинин <[email protected]>
To: Álvaro Herrera <[email protected]>
Cc: [email protected]
Cc: Antonin Houska <[email protected]>
Cc: [email protected]
Subject: Re: BUG #19500: pgrepack logical decoding plugin can crash assert builds via SQL decoding API
Date: Tue, 2 Jun 2026 09:39:26 +0700
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
> On 2 Jun 2026, at 00:12, Álvaro Herrera <[email protected]> wrote:
>
> How about something like this? It makes your test case throw an error
> instead of failing the assertion, which I suppose is an improvement.
>
> The patch is a bit noisy because I moved more code than the minimum
> necessary; but the gist of it is that we allocate RepackDecodingState in
> repack_startup(), then have repack_setup_logical_decoding() fill in a
> magic number, which we later check in repack_begin_txn(). This is a bit
> wasteful, because we have to do that check once for each and every
> transaction; however I see no other callback that would let us do this
> kind of check after the slot is created but before we start to consume
> from it.
>
> --
> Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/
> "Before you were born your parents weren't as boring as they are now. They
> got that way paying your bills, cleaning up your room and listening to you
> tell them how idealistic you are." -- Charles J. Sykes' advice to teenagers
> <0001-Have-RepackDecodingState-carry-a-magic-number.patch>
Yes, I agree that returning an error to the user makes sense.
But does the error message need to be that detailed? Perhaps something like
"ERROR: wrong magic number in "pgrepack" decoder plugin"
would be sufficient.
Nevertheless, I tested the patch and can confirm that there are no assertion failures anymore.
I also ran it under ASAN and did not observe any issues.
Would it make sense to add a test for this case from the bug report?
view thread (14+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: Re: BUG #19500: pgrepack logical decoding plugin can crash assert builds via SQL decoding API
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox