From: Amit Kapila <amit.kapila16@gmail.com>
To: Daniel Gustafsson <daniel@yesql.se>
Cc: Amit Kapila <akapila@postgresql.org>
Cc: pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Fix fetching default toast value during decoding of in-progress
Date: Tue, 8 Oct 2024 10:47:50 +0530
Message-ID: <CAA4eK1K_ikMjeKqsOf9SsDAu4S8_CU6n15RP13-j4cMSKn-H+g@mail.gmail.com> (raw)
In-Reply-To: <CAA4eK1JUiLwmLyw99JNXrr1-9yqJULCjXbiWP2LJue96vQvWcQ@mail.gmail.com>
References: <E1sxktF-002XJS-Js@gemulon.postgresql.org>
<8C2F86AA-981E-4803-B14D-E264C0255330@yesql.se>
<CAA4eK1LPKvJgxbAFmw4gUz2Gzcy5OPHKeRcn_tv4zxgGNXK97g@mail.gmail.com>
<CAA4eK1JUiLwmLyw99JNXrr1-9yqJULCjXbiWP2LJue96vQvWcQ@mail.gmail.com>
On Mon, Oct 7, 2024 at 7:03 PM Amit Kapila <amit.kapila16@gmail.com> wrote:
>
> On Mon, Oct 7, 2024 at 4:16 PM Amit Kapila <amit.kapila16@gmail.com> wrote:
> >
> > On Mon, Oct 7, 2024 at 4:14 PM Daniel Gustafsson <daniel@yesql.se> wrote:
> > >
> > > > On 7 Oct 2024, at 12:22, Amit Kapila <akapila@postgresql.org> wrote:
> > > >
> > > > Fix fetching default toast value during decoding of in-progress transactions.
> > >
> > > v14&v15 on adder seems a bit unhappy in the test_decoding test suite:
> > >
> >
> > oops, will check.
> >
>
> I think the reason for the instability of the test in 14 and 15 is
> that we don't have a predictable way to start streaming in those
> branches. We rely on the size of the reorder buffer. This can vary
> based on some background activity autoanalyze or others which can
> generate WAL records.
>
On further thinking, it appears to me that the reason is that the size
of records inserted may vary depending on the compression used for
toast (default_toast_compression=lz4) and or alignment. This can lead
to unpredictable behavior as to when to start streaming the changes,
leading to failure in some machines. I suggest changing the test to
use the PREPARE statement as that can reproduce the bug without the
fix as well. I'll test that change and commit it unless I see a
problem.
> So, will think some more on it tomorrow on how
> to make it reliable in those two branches. For other branches, we used
> GUC debug_logical_replication_streaming to control the streaming
> behavior.
>
It is better to keep the test the same in all branches so that any
future change is easier to backpatch and also for the sake of
consistency. So, even though the test works fine due to GUC
debug_logical_replication_streaming in branches >=16, I am planning to
change it to use the PREPARE statement.
--
With Regards,
Amit Kapila.
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: amit.kapila16@gmail.com, daniel@yesql.se, akapila@postgresql.org
Subject: Re: pgsql: Fix fetching default toast value during decoding of in-progress
In-Reply-To: <CAA4eK1K_ikMjeKqsOf9SsDAu4S8_CU6n15RP13-j4cMSKn-H+g@mail.gmail.com>
References: <E1sxktF-002XJS-Js@gemulon.postgresql.org> <8C2F86AA-981E-4803-B14D-E264C0255330@yesql.se> <CAA4eK1LPKvJgxbAFmw4gUz2Gzcy5OPHKeRcn_tv4zxgGNXK97g@mail.gmail.com> <CAA4eK1JUiLwmLyw99JNXrr1-9yqJULCjXbiWP2LJue96vQvWcQ@mail.gmail.com> <CAA4eK1K_ikMjeKqsOf9SsDAu4S8_CU6n15RP13-j4cMSKn-H+g@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 DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox