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 1ngsPd-0006Z3-D1 for pgsql-hackers@arkaria.postgresql.org; Tue, 19 Apr 2022 18:17:17 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ngsPc-00060M-3V for pgsql-hackers@arkaria.postgresql.org; Tue, 19 Apr 2022 18:17:16 +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 1ngsPb-000601-Ay for pgsql-hackers@lists.postgresql.org; Tue, 19 Apr 2022 18:17:15 +0000 Received: from wout4-smtp.messagingengine.com ([64.147.123.20]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ngsPT-0007ti-Ur for pgsql-hackers@lists.postgresql.org; Tue, 19 Apr 2022 18:17:13 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id 19D7B3201FCE; Tue, 19 Apr 2022 14:17:05 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Tue, 19 Apr 2022 14:17:05 -0400 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= fm1; t=1650392224; x=1650478624; bh=7RSR1G8Mtocre1fIEnT8fJmlJgQI tAE10Hk57ZqMkWo=; b=wIV2YtCwZPGgtUEEMJMQLAwXHPghhNlOcncD3tqRw0QB oqyGk3brH8jQzYFSgx8QLlIFYfELpJduKu1mlgqqE1iDwOKzpPkNP+bewe2WVHoO wcXgMfwkmjGRb9lbwgzNwmwEyCAZtaMPAH7hzHA7CqmY/bYQnTTHTGS926MCWj9M 93eVHeQvygpLWwSoetCxs83wUJfQzg4D0zD5lBqIYfWPrzr0Xk8SQMctjNS7DiMm iecQh8E491Ir98morjmy3G4RUzs05DjWdjOLLHBV3wTUxBiIuI9a2BhvOzhJJfrK RS6OtBE4S3tGvpusZgZn9Sc1qqQwcajxa6YEu6M0ZA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrvddtfedguddvvdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvuffkgggtugfgjgesmhekreertddtjeenucfhrhhomheptehlvhgr rhhoucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh eqnecuggftrfgrthhtvghrnheptedvhfetueeukeefhfefudegfffhhefhvdelffelteek geegfefhgfegkeejtddunecuffhomhgrihhnpegvnhhtvghrphhrihhsvggusgdrtghomh enucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrlhhv hhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 19 Apr 2022 14:17:04 -0400 (EDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 1975A2A1B51; Tue, 19 Apr 2022 18:37:13 +0200 (CEST) Date: Tue, 19 Apr 2022 18:37:13 +0200 From: Alvaro Herrera To: Tom Lane Cc: Andres Freund , pgsql-hackers@lists.postgresql.org, Noah Misch , Peter Geoghegan , David Rowley , Amit Kapila , Masahiko Sawada Subject: Re: Intermittent buildfarm failures on wrasse Message-ID: <202204191637.eldwa2exvguw@alvherre.pgsql> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="jzwajoaj6dasettn" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1737834.1650046487@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --jzwajoaj6dasettn Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit On 2022-Apr-15, Tom Lane wrote: > Here's a WIP patch for that. The only exciting thing in it is that > because of some undocumented cowboy programming in walsender.c, the > Assert((proc->statusFlags & (~PROC_COPYABLE_FLAGS)) == 0); > in ProcArrayInstallRestoredXmin fires unless we skip that. Hmm, maybe a better use of that define is to use to select which flags to copy, rather than to ensure we they are the only ones set. What about this? -- Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/ "¿Qué importan los años? Lo que realmente importa es comprobar que a fin de cuentas la mejor edad de la vida es estar vivo" (Mafalda) --jzwajoaj6dasettn Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="copyflags.patch" diff --git a/src/backend/storage/ipc/procarray.c b/src/backend/storage/ipc/procarray.c index 25c310f675..4347941568 100644 --- a/src/backend/storage/ipc/procarray.c +++ b/src/backend/storage/ipc/procarray.c @@ -2685,17 +2685,14 @@ ProcArrayInstallRestoredXmin(TransactionId xmin, PGPROC *proc) TransactionIdIsNormal(xid) && TransactionIdPrecedesOrEquals(xid, xmin)) { - /* Install xmin */ + /* + * Install xmin. In addition, propagate statusFlags that affect how + * the value is interpreted by vacuum. + */ MyProc->xmin = TransactionXmin = xmin; - /* walsender cheats by passing proc == MyProc, don't check its flags */ - if (proc != MyProc) - { - /* Flags being copied must be valid copy-able flags. */ - Assert((proc->statusFlags & (~PROC_COPYABLE_FLAGS)) == 0); - MyProc->statusFlags = proc->statusFlags; - ProcGlobal->statusFlags[MyProc->pgxactoff] = MyProc->statusFlags; - } + MyProc->statusFlags |= (proc->statusFlags & PROC_COPYABLE_FLAGS); + ProcGlobal->statusFlags[MyProc->pgxactoff] = MyProc->statusFlags; result = true; } --jzwajoaj6dasettn--