public inbox for [email protected]  
help / color / mirror / Atom feed
From: Antonin Houska <[email protected]>
To: Srinath Reddy Sadipiralla <[email protected]>
Cc: Tom Lane <[email protected]>
Cc: Andres Freund <[email protected]>
Cc: Noah Misch <[email protected]>
Cc: Alvaro Herrera <[email protected]>
Cc: vignesh C <[email protected]>
Cc: Amit Kapila <[email protected]>
Cc: Mihail Nikalayeu <[email protected]>
Cc: Matthias van de Meent <[email protected]>
Cc: Pg Hackers <[email protected]>
Cc: Robert Treat <[email protected]>
Subject: Re: Adding REPACK [concurrently]
Date: Tue, 07 Apr 2026 10:57:46 +0200
Message-ID: <188275.1775552266@localhost> (raw)
In-Reply-To: <CAFC+b6ojcdgpVb0euBvqy-b3W7F=NXZ7PhrruQnyzkDouoGZXQ@mail.gmail.com>
References: <CALDaNm3tiKhtegx5Cawi34UjbHmNGEDNAtScGM1RgWRtV-5_0Q@mail.gmail.com>
	<[email protected]>
	<pbqm52nsviwojptiszg2g6pqntbhnhaotbxshiysnensshnuv5@v6pmney4jror>
	<[email protected]>
	<jaxapcek2yxbpyegajeim4aczdkjo4od7xxmtauf4fqtjtcpph@ws4anpqvjero>
	<[email protected]>
	<CAFC+b6ojcdgpVb0euBvqy-b3W7F=NXZ7PhrruQnyzkDouoGZXQ@mail.gmail.com>

Srinath Reddy Sadipiralla <[email protected]> wrote:

> Hi Tom,
> 
> On Tue, Apr 7, 2026 at 10:14 AM Tom Lane <[email protected]> wrote:
> 
>  Maybe you saw this already, but BF member skink is failing on
>  src/test/modules/injection_points/specs/repack.spec:
> 
>  https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=skink&dt=2026-04-06%2022%3A50%3A41
> 
> i looked into this , it seems like valgrind catches the uninitialised padding bytes, which
> repack worker is writing using BufFileWrite, it seems this fix solved the problem.
> 
> diff --git a/src/backend/utils/time/snapmgr.c b/src/backend/utils/time/snapmgr.c
> index 2e6197f5f35..f5682b87626 100644
> --- a/src/backend/utils/time/snapmgr.c
> +++ b/src/backend/utils/time/snapmgr.c
> @@ -1739,6 +1739,8 @@ SerializeSnapshot(Snapshot snapshot, char *start_address)
>  
>   Assert(snapshot->subxcnt >= 0);
>  
> + MemSet(&serialized_snapshot, 0, sizeof(SerializedSnapshotData));
> +
>   /* Copy all required fields */
>   serialized_snapshot.xmin = snapshot->xmin;
>   serialized_snapshot.xmax = snapshot->xmax;
> 
> thoughts?

Could you reproduce the failure in your environment?

I haven't thought of this explanation because BufFileWrite() only copies the
data to a buffer in the BufFile structure and BufFileDumpBuffer() writes the
buffer. Maybe valgrind is able to track the copying?

-- 
Antonin Houska
Web: https://www.cybertec-postgresql.com





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], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
  Subject: Re: Adding REPACK [concurrently]
  In-Reply-To: <188275.1775552266@localhost>

* 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