Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nJGm7-0006bj-G8 for pgsql-committers@arkaria.postgresql.org; Sun, 13 Feb 2022 15:26:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nJGm5-0005cU-TA for pgsql-committers@arkaria.postgresql.org; Sun, 13 Feb 2022 15:26:53 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nJGm4-0005cL-QH for pgsql-committers@lists.postgresql.org; Sun, 13 Feb 2022 15:26:53 +0000 Received: from wout5-smtp.messagingengine.com ([64.147.123.21]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nJGlw-0003df-2f for pgsql-committers@lists.postgresql.org; Sun, 13 Feb 2022 15:26:50 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id E21773200A2A; Sun, 13 Feb 2022 10:26:41 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Sun, 13 Feb 2022 10:26:42 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; bh=QcWb3QMjbixjp9el2jPmVnSHkWS+KLL+7WwFAwpKkUo=; b=W0gin3Nm DvF2HCEBWal6VpgmlCAq0IdGSFEFWXrgJO7iYCFFwNvPPFtpERXI5IvUtXuZ4afN kX8uj6hNnW0Zppno5Gg6TyuqJWFidqt9StjyPP2LRafJ0hTc5I4o2gkOav3PBcaB To+Z2rxGG8Ez36cJ8gvZ5isGs3t3zsRJ1hS1lwyRsDRZ1AT6t8mY951CYGTMnP+b ESbcnG5mhWiZCpDkWU2PAKX9De40gBrbZ4LuVNfUIo1rHBR9K2AnmkJRare/fv3y XqlY25FxxaN9JpG8yZSgEo31RdDn4oa33n8EMQC+lOcx5fewE+tTs0ZuhrVjkoQg Q8GW2K9LLwnmQg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrjedtgdejudcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvuffkgggtugfgjgesthekredttddtjeenucfhrhhomheptehlvhgrrhho ucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgheqne cuggftrfgrthhtvghrnhepudejveejffejveduudetvdekieeuiedtvdeileefkeevjedu feeguedvjefhueelnecuffhomhgrihhnpegvnhhtvghrphhrihhsvggusgdrtghomhenuc evlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrlhhvhhgv rhhrvgesrghlvhhhrdhnohdqihhprdhorhhg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 13 Feb 2022 10:26:40 -0500 (EST) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 862212A06AA; Sun, 13 Feb 2022 12:26:37 -0300 (-03) Date: Sun, 13 Feb 2022 12:26:37 -0300 From: Alvaro Herrera To: Tomas Vondra Cc: pgsql-committers@lists.postgresql.org Subject: Re: pgsql: Fix skip-empty-xacts with sequences in test_decoding Message-ID: <202202131526.2n2bcdx2cjse@alvherre.pgsql> 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 2022-Feb-12, Tomas Vondra wrote: > Fix skip-empty-xacts with sequences in test_decoding > > Regression tests need to use skip-empty-xacts = false, because there > might be accidental concurrent activity (like autovacuum), particularly > on slow machines. The tests added by 80901b3291 failed to do that in a > couple places, triggering occasional failures on buildfarm. I think you meant "... need to use skip-empty-xacts = true", since you changed the value from 0 to 1, and the point is precisely to *skip* those transactions. (The hidden double negative "skip=false" seems quite confusing BTW.) > Fixing the tests however uncovered a bug in the code, because sequence > callbacks did not handle skip-empty-xacts properly. For trasactional > increments we need to check/update the xact_wrote_changes flag, and emit > the BEGIN if it's the first change in the transaction. Hmm. Perhaps there should be a separate test script that runs various things under skip-empty-xacts=0 and somehow protected against ancillary activities (maybe a TAP test using autovacuum=0), just so that this new code is covered ... -- Álvaro Herrera 39°49'30"S 73°17'W — https://www.EnterpriseDB.com/ "Nadie está tan esclavizado como el que se cree libre no siéndolo" (Goethe)