pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Misplaced comment in snapbuild.c
3+ messages / 2 participants
[nested] [flat]

* Misplaced comment in snapbuild.c
@ 2026-09-09 18:35 Antonin Houska <ah@cybertec.at>
  2026-09-10 20:06 ` Re: Misplaced comment in snapbuild.c Masahiko Sawada <sawada.mshk@gmail.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Antonin Houska @ 2026-09-09 18:35 UTC (permalink / raw)
  To: pgsql-hackers

This patch moves a comment to where it was until commits 2bef06d516 and
240e0dbacd added some code (including another comment) in front of the related
line.

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

Attachments:

  [text/x-diff] move_comment_to_original_location.diff (1.1K, ../../14864.1788978951@localhost/2-move_comment_to_original_location.diff)
  download | inline diff:
diff --git a/src/backend/replication/logical/snapbuild.c b/src/backend/replication/logical/snapbuild.c
index f60bcf09605..de491ea0c4b 100644
--- a/src/backend/replication/logical/snapbuild.c
+++ b/src/backend/replication/logical/snapbuild.c
@@ -471,10 +471,6 @@ SnapBuildInitialSnapshot(SnapBuild *builder)
 	snap = SnapBuildBuildSnapshot(builder);
 
 	/*
-	 * We know that snap->xmin is alive, enforced by the logical xmin
-	 * mechanism. Due to that we can do this without locks, we're only
-	 * changing our own value.
-	 *
 	 * Building an initial snapshot is expensive and an unenforced xmin
 	 * horizon would have bad consequences, therefore always double-check that
 	 * the horizon is enforced.
@@ -487,6 +483,11 @@ SnapBuildInitialSnapshot(SnapBuild *builder)
 		elog(ERROR, "cannot build an initial slot snapshot as oldest safe xid %u follows snapshot's xmin %u",
 			 safeXid, snap->xmin);
 
+	/*
+	 * We know that snap->xmin is alive, enforced by the logical xmin
+	 * mechanism. Due to that we can do this without locks, we're only
+	 * changing our own value.
+	 */
 	MyProc->xmin = snap->xmin;
 
 	/* allocate in transaction context */

^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Misplaced comment in snapbuild.c
  2026-09-09 18:35 Misplaced comment in snapbuild.c Antonin Houska <ah@cybertec.at>
@ 2026-09-10 20:06 ` Masahiko Sawada <sawada.mshk@gmail.com>
  2026-09-10 20:34   ` Re: Misplaced comment in snapbuild.c Masahiko Sawada <sawada.mshk@gmail.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Masahiko Sawada @ 2026-09-10 20:06 UTC (permalink / raw)
  To: Antonin Houska <ah@cybertec.at>; +Cc: pgsql-hackers

Hi,

On Wed, Sep 9, 2026 at 11:36 AM Antonin Houska <ah@cybertec.at> wrote:
>
> This patch moves a comment to where it was until commits 2bef06d516 and
> 240e0dbacd added some code (including another comment) in front of the related
> line.

Thank you for the report and the patch. I agree to fix it. I'll push it shortly.

Regards,

-- 
Masahiko Sawada
Amazon Web Services: https://aws.amazon.com





^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Misplaced comment in snapbuild.c
  2026-09-09 18:35 Misplaced comment in snapbuild.c Antonin Houska <ah@cybertec.at>
  2026-09-10 20:06 ` Re: Misplaced comment in snapbuild.c Masahiko Sawada <sawada.mshk@gmail.com>
@ 2026-09-10 20:34   ` Masahiko Sawada <sawada.mshk@gmail.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Masahiko Sawada @ 2026-09-10 20:34 UTC (permalink / raw)
  To: Antonin Houska <ah@cybertec.at>; +Cc: pgsql-hackers

On Thu, Sep 10, 2026 at 1:06 PM Masahiko Sawada <sawada.mshk@gmail.com> wrote:
>
> Hi,
>
> On Wed, Sep 9, 2026 at 11:36 AM Antonin Houska <ah@cybertec.at> wrote:
> >
> > This patch moves a comment to where it was until commits 2bef06d516 and
> > 240e0dbacd added some code (including another comment) in front of the related
> > line.
>
> Thank you for the report and the patch. I agree to fix it. I'll push it shortly.

Done.

Regards,

-- 
Masahiko Sawada
Amazon Web Services: https://aws.amazon.com






^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2026-09-10 20:34 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-09-09 18:35 Misplaced comment in snapbuild.c Antonin Houska <ah@cybertec.at>
2026-09-10 20:06 ` Masahiko Sawada <sawada.mshk@gmail.com>
2026-09-10 20:34   ` Masahiko Sawada <sawada.mshk@gmail.com>

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