Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1x4N9K-0076LL-1O for pgsql-hackers@arkaria.postgresql.org; Wed, 09 Sep 2026 18:35:58 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1x4N9I-00HFmE-14 for pgsql-hackers@arkaria.postgresql.org; Wed, 09 Sep 2026 18:35:56 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1x4N9H-00HFm0-3B for pgsql-hackers@lists.postgresql.org; Wed, 09 Sep 2026 18:35:56 +0000 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1x4N9E-00000003ozr-3qvK for pgsql-hackers@postgresql.org; Wed, 09 Sep 2026 18:35:55 +0000 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-498028b3d5eso59077815e9.1 for ; Wed, 09 Sep 2026 11:35:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec.at; s=google; t=1788978952; x=1789583752; darn=postgresql.org; h=message-id:date:content-type:mime-version:subject:to:from:from:to :cc:subject:date:message-id:reply-to:content-type; bh=NWCsVz9+3PqOsXVYxxwmbSWUWNXyiBar5vWnoA/bz+A=; b=ajoI6UaL+kNa9pPRsaJiSQXuwM4lFp2bvNDhFbpUIA1RIOo6lnudFKfxL6NzaPzi3v 9Ko0ify+X5q3uDUdDsfcLBN+yiJKbAXN+Ph3cBrE04jFuOMDPzKXi8VlqoxWKsYQNUGg ipO9jbqX03RjGAQiDFk+xdVxtg8TIb7VGL78ZHPQqnG/AVwpflCdK+ylDG9VHgVIbSi4 BnzzV0Yp1Kkzr+U1Hk0Gh3hrjvie4CV6gaUqML7ezjFhLVtqYJn1DphbRNW+Vnos2V/M r9RGQLZ+1LtqpEYqGdTc4UJaHsfBUQPSOniv3kABn/EyBZ9gxYOU5yekoBWFs3X18RnP 9ypQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1788978952; x=1789583752; h=message-id:date:content-type:mime-version:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=NWCsVz9+3PqOsXVYxxwmbSWUWNXyiBar5vWnoA/bz+A=; b=S6yPOcx8Z3vah4R6eVkqukz997ai2KymbeoJE4gG5NywM8OJommHn/Uu/FayL0hOZr oMsjsp29W6yRlkHGcuwvduiCOnLpKk0MQhnmdprjTgFY/GM8ccqRQ+rY33XpGEz6hj7c x+adzgTvdNqKTBhyLJKOeddTyi5aYbkJDkVWvldpgsCUJDfHVTNyQ0Il7JSqknGna+Iu t9vjaMUnMXDjI2WgNzw9o/NFnHpl0ZGCJNqs7NfzNc/ZWylT+3Anl3OcYzpkHYCXxHXU QkI/iBRECM2zs4JlQnKCJb3XdCvi8NwqpRx3d6Kt6S7lOxQuJ0MMly6PFUGvPqATsdoz eg+g== X-Gm-Message-State: AFuF++nyxBYg9xuDRI80tul5ZR3AG3E8Pp6vF3PqcihcipxJ3SqpDiEN 7QnpfSu8l0JZJL+SaLrkYOxkOwcFoNKejPeOdupDGVnxG4tqXS2kZqwPQRivStEOCg/MOXyLxC5 HEy2yEwc= X-Gm-Gg: AYBFou0gujmEhrP9Lw5RaojZosZl1oUiSHlS9pFKBmDS7TTvcH1QRkSIQxfDCtNKP6n aMuoBSlJVOgJ8FE7n6blGK7MkX4q3UW9Yh5KG/C/cMCm8nF7tVxK9iO713LCQt75fAfYieKLV5X VVq0vAmji6jUlyLpg/D9HWxCQcudrshe3G2lhl8JVe4pkDRhtpQst5L4loFnWRFAFXu7RVA2B+A TUEdC+Xfe8hoOp9PXnPe9N1tRBWbNDNtzSsOfSZDZ/0mWhZnbkqKzUahe3MGXJ4FYCZQhTqWUw3 dhN8J3ntlyDAcVrRQM0C4efCotyynsONvhPYlF3T1CVR9ak2dFUlJSBBWeqggflEtoKJJrdkFPO mRt1xKhZd0m85+pL4AVziH3IJ0/PgnOg3WLERhcAyOfQL+ZcF87+AGsmGl6LWbUvc8EmmVyrOlX CGZy999ebubg9OFUXOyBCuT6KlNRkKMYrsjVH+1Qu/Rxz0BWQ4MG7lUzA+TuVooTQAWI7Gw2qK4 CHrsRPk4GTx X-Received: by 2002:a05:600c:6091:b0:49c:eb17:cf3b with SMTP id 5b1f17b1804b1-49cf8252497mr336243095e9.8.1788978951954; Wed, 09 Sep 2026 11:35:51 -0700 (PDT) Received: from localhost (109-81-170-190.rct.o2.cz. [109.81.170.190]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49d26c38e3asm9861365e9.9.2026.09.09.11.35.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Sep 2026 11:35:51 -0700 (PDT) From: Antonin Houska To: pgsql-hackers@postgresql.org Subject: Misplaced comment in snapbuild.c X-Mailer: MH-E 8.6+git; nmh 1.8; GNU Emacs 28.3 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Date: Wed, 09 Sep 2026 20:35:51 +0200 Message-ID: <14864.1788978951@localhost> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --=-=-= Content-Type: text/plain 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 --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=move_comment_to_original_location.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 */ --=-=-=--