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.98.2) (envelope-from ) id 1x9gc6-00000002ASd-1vYs for pgsql-hackers@arkaria.postgresql.org; Thu, 24 Sep 2026 10:23:39 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.98.2) (envelope-from ) id 1x9gc5-0000000Auau-3108 for pgsql-hackers@arkaria.postgresql.org; Thu, 24 Sep 2026 10:23:37 +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.98.2) (envelope-from ) id 1x9gc5-0000000Aual-0MjM for pgsql-hackers@lists.postgresql.org; Thu, 24 Sep 2026 10:23:37 +0000 Received: from fout-b4-smtp.messagingengine.com ([202.12.124.147]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1x9gc1-000000012ZL-2Mdj for pgsql-hackers@lists.postgresql.org; Thu, 24 Sep 2026 10:23:36 +0000 Received: from phl-compute-05.internal (phl-compute-05.internal [10.202.2.45]) by mailfout.stl.internal (Postfix) with ESMTP id 9FCA01D00094; Thu, 24 Sep 2026 06:23:30 -0400 (EDT) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-05.internal (MEProxy); Thu, 24 Sep 2026 06:23:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kurilemu.de; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :reply-to:subject:subject:to:to; s=fm3; t=1790245410; x= 1790331810; bh=1/gRmarOZzYCCyMl9uJVox5EQDzPU0SIDHmmhGLEmw8=; b=M YhlADaL3mdHsUXOZSzKwfLucXBE0cFI5KGhgTpLgM97xqqmoOr7FJm18nEa8qR2k imqqt3DJXfXoJo1P9K6mNOiqEkfYWe9b6VCdYyIpL5Hdm+8ppDYw0VejZ3KNZiB9 6vhB+EOQxKVQk5bwZYA8/Ye5dsjEBm1v6ybMBqktls/LP4Rrv3w0CiyFZesDmhmg CvCwBxWJkmt3Fx08R4vq3wH41Cq2i2VZAQ44Q2St3piha52PVhN15Y8KWQPJyp6K ieY2d0bETh3pMuxOkhx5TlyjUMr8xtG1xToyy3wnRj0Eu8+fgEhGPajlKudcGWrQ xR5gMii03+VAT6NdHd/cg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; t=1790245410; x=1790331810; bh=1 /gRmarOZzYCCyMl9uJVox5EQDzPU0SIDHmmhGLEmw8=; b=pkpUF5S4Uv5IuagxD y+gIBCq1SKn7JvymJn0sy3LQ5fFwzUmcIDp1LI6ups/SoM8ZzvCRewOdGCJAs1Vo 8v3yvfm0e41CocUsuF1AGgxkZJcRfPrHwEmXXMFSLnkJIZ1Yyg5xYwjjebtwOCwL wJjxRS+yFWXpO76ZwWGBPAHqgM4wlNUx8t3FA+vQm+1tIFYLDnELHflQH5WAGMmJ aO3UvrqZbOywDvkM22HvU5wn+yRRUNaiuuFni0qE0f0IxRXjfAA+zbrQ3ZwtKInT VNHXFh5uYTj6l4/vS6tLqB12HrOGaMFhHZgcS2arAr6sBfc7z1phew1pFDGdqiyg Guyvw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: dmFkZTF2KreV1uGG6u2OG8xM1fdG7hgM29+4zxBF9nplMdLI5JjJM6I5/kIg+801FdSCTF Wty66tNF1LtvZYzTp/6bWzDCNxEwjetH9/4rziDW4yfh25Z2bbaeU21K9PaxFeSRVCDvVf zLVkEBNVUgGVtzvJTMrKP3E+ai2uZKUFSTxa7q3RnYSdpi9gI42LpsrYvGuYFudZybo6Bi 70gehbzxB/P+i5HrezUaUQ4KuExRbmv8ybiSsP2wfNI3/ihrldu692h0N0TaFW2cSc1fvd wiAjn8s7e/N32F+rsv1+kMA35QpHsAtUlnpNw3flpVKP7IMGYBuANJazW7VUxXW3VgD7bk 6Cym2yGuQfMX2162y2dGgxfTRrsLhcU+XQklu/LUVRJAZIkzs4l88Ql6y1y+Iu/iBRu81e eOkWq1wljklV13dpxk6oFyq2IbS4ZA5WeXzpLawEc/efNMlXu4O4nSDN1Mqo8zCW/ygiX0 gsf/vsR1L4Ql1N/ihdpBVTTU1ErLveav3CSUhm9ebQKma59PKdQVqFpQH6/MWPdRfwOqJg x1TPzSf9iAJNCDC0527zWyUB+cwrBDHAXvHIydsq9DPISz7kSG6gnNo6EBd5Ra4tpzi/ly zNJfdyNmkVroElDklV+8FjbO67ZGjxZwVK4oLaRFnkb7bTuTfYC/ZsMZGrXA X-ME-Proxy: Feedback-ID: ie3de48e3:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 24 Sep 2026 06:23:30 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kurilemu.de; s=schmee; t=1790245407; bh=BCPbee36HLurXrGdB2kdHBYTGGhk7XC7BH8KzS/GbCk=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=floFeuTJol/bNpkCU4lhRJQxuvmfebMMWi1X0NLtp2YAd3/Y/S3E/PWQyQmzfIeEX 614fE0xcuT3TrXJkT3xQvsAgN+wlJrfd9JvVn2CC4NsLTk93d14m4mzjoYw57dua11 EQwNSlgy1hojc3MUy5upiOSq7Tz5wN58hmj4BpHlW1UVl7L+EheK1mYzL8v1xxXDt9 5TVR1Os3bIX7ND30A1fhCHzYsaFVSyvlbZbTA2eg2f0j7znI0oXlM0RLQpFtoEOIlJ UR03glzGUlFKBfJx4CzS2PUN+MjPYRoJ6BkDJunUawtM6ZPY3JTykX3oQ8ecpUi51p 8X3hEnNXZymYg== Received: by ida.kurilemu.internal (Postfix, from userid 1000) id 8635AB00096; Thu, 24 Sep 2026 12:23:27 +0200 (CEST) Date: Thu, 24 Sep 2026 12:23:27 +0200 From: Alvaro Herrera To: Rui Zhao Cc: Antonin Houska , Andres Freund , pgsql-hackers@lists.postgresql.org, Mihail Nikalayeu Subject: Re: Race conditions in logical decoding Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2026-Sep-24, Rui Zhao wrote: > Thanks. Going back to my original loop with the limit changed to > running->xcnt makes sense. OK, I have pushed this to all branches, including the test cases on branches where they work. Thanks all for the work on this issue! I'm going to mark the two pg19 open items (!!) as done. > On 2026-Sep-21 at 15:35 UTC, Alvaro Herrera wrote: > > I think we should just go up to running->xcnt > > only; > > Yes, scanning the subxids was unnecessary. My previous explanation > addressed overflow, but waiting for the parent covers the children in > the non-overflow case too. A note on the top-level-first ordering in > RunningTransactionsData would make that dependency explicit. I didn't add this ... let's consider that as follow-on work, but we don't need it to be backpatched. > > maybe we should add > > something in SnapBuildBuildSnapshot() > > Agreed. The explanation of why historic snapshots need no wait for > transactions to finish belongs there. The comment in > SnapBuildInitialSnapshot() can then focus on why the conversion to a > normal MVCC snapshot needs the wait. Done that way -- I hope the explanations are clear. -- Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/