From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alexander Korotkov <aekorotkov@gmail.com>
Cc: Melanie Plageman <melanieplageman@gmail.com>
Cc: pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Improve runtime and output of tests for replication slots checkp
Date: Fri, 20 Jun 2025 19:42:38 -0400
Message-ID: <2594452.1750462958@sss.pgh.pa.us> (raw)
In-Reply-To: <CAPpHfdtmLNpswWzk2qQ7-nMBLod2GrRWwMvfb0hc7tQfDD--ZQ@mail.gmail.com>
References: <E1uSOip-002TUa-0p@gemulon.postgresql.org>
<CAAKRu_ZCOzQpEumLFgG_+iw3FTa+hJ4SRpxzaQBYxxM_ZAzWcA@mail.gmail.com>
<2542023.1750456985@sss.pgh.pa.us>
<2585993.1750458298@sss.pgh.pa.us>
<CAPpHfdsedYNmKDnDuueJor2k8kA+hgEJKFJRf4PhDowdP_A4Bg@mail.gmail.com>
<CAPpHfdtmLNpswWzk2qQ7-nMBLod2GrRWwMvfb0hc7tQfDD--ZQ@mail.gmail.com>
Alexander Korotkov <aekorotkov@gmail.com> writes:
> And I see the following variable values.
> (lldb) p/x targetPagePtr
> (XLogRecPtr) 0x0000000029004000
> (lldb) p/x RecPtr
> (XLogRecPtr) 0x0000000029002138
> I hardly understand how is this possible given it was compiled with "-O0".
> I'm planning to continue investigating this tomorrow.
Yeah, I see
(lldb) p/x targetPagePtr
(XLogRecPtr) 0x0000000029004000
(lldb) p/x RecPtr
(XLogRecPtr) 0x0000000029002138
(lldb) p/x RecPtr - (RecPtr % 8192)
(XLogRecPtr) 0x0000000029002000
We're here:
/* Calculate pointer to beginning of next page */
targetPagePtr += XLOG_BLCKSZ;
/* Wait for the next page to become available */
readOff = ReadPageInternal(state, targetPagePtr,
Min(total_len - gotlen + SizeOfXLogShortPHD,
XLOG_BLCKSZ));
so that's where the increment of targetPagePtr came from.
But "Wait for the next page to become available" seems awfully
trusting that there will be another page. Should this be
using the no-wait code path?
regards, tom lane
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: pgsql-committers@postgresql.org
Cc: tgl@sss.pgh.pa.us, aekorotkov@gmail.com, melanieplageman@gmail.com, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Improve runtime and output of tests for replication slots checkp
In-Reply-To: <2594452.1750462958@sss.pgh.pa.us>
* 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