public inbox for [email protected]
help / color / mirror / Atom feedFrom: Amit Kapila <[email protected]>
To: Ashutosh Bapat <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Subject: Re: pg_decode_message vs skip_empty_xacts and xact_wrote_changes
Date: Mon, 26 Jun 2023 15:51:10 +0530
Message-ID: <CAA4eK1JLRiW_Mkps+oGu_a1DZHJqhoXV9Ru33B4hV5UYUtLPJg@mail.gmail.com> (raw)
In-Reply-To: <CAExHW5ujRhbOz6_aTq_jQA8NjeFqq9d_8G9viShWvXx8gdSXiQ@mail.gmail.com>
References: <CAExHW5ujRhbOz6_aTq_jQA8NjeFqq9d_8G9viShWvXx8gdSXiQ@mail.gmail.com>
On Mon, Jun 26, 2023 at 3:07 PM Ashutosh Bapat
<[email protected]> wrote:
>
> Hi All,
> Every pg_decode routine except pg_decode_message that decodes a
> transactional change, has following block
> /* output BEGIN if we haven't yet */
> if (data->skip_empty_xacts && !txndata->xact_wrote_changes)
> {
> pg_output_begin(ctx, data, txn, false);
> }
> txndata->xact_wrote_changes = true;
>
> But pg_decode_message() doesn't call pg_output_begin(). If a WAL
> message is the first change in the transaction, it won't have a BEGIN
> before it. That looks like a bug. Why is pg_decode_message()
> exception?
>
I can't see a reason why we shouldn't have a similar check for
transactional messages. So, agreed this is a bug.
--
With Regards,
Amit Kapila.
view thread (8+ 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]
Subject: Re: pg_decode_message vs skip_empty_xacts and xact_wrote_changes
In-Reply-To: <CAA4eK1JLRiW_Mkps+oGu_a1DZHJqhoXV9Ru33B4hV5UYUtLPJg@mail.gmail.com>
* 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