From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Andres Freund <andres@anarazel.de>
Cc: pgsql-hackers@lists.postgresql.org, Noah Misch <noah@leadboat.com>
Cc: Peter Geoghegan <pg@bowt.ie>
Cc: David Rowley <dgrowleyml@gmail.com>
Cc: Amit Kapila <amit.kapila16@gmail.com>
Cc: Masahiko Sawada <sawada.mshk@gmail.com>
Subject: Re: Intermittent buildfarm failures on wrasse
Date: Tue, 19 Apr 2022 18:37:13 +0200
Message-ID: <202204191637.eldwa2exvguw@alvherre.pgsql> (raw)
In-Reply-To: <1737834.1650046487@sss.pgh.pa.us>
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)
Attachments:
[text/x-diff] copyflags.patch (1.1K, ../202204191637.eldwa2exvguw@alvherre.pgsql/2-copyflags.patch)
download | inline diff:diff --git a/src/backend/storage/ipc/procarray.c b/src/backend/storage/ipc/procarray.cindex 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;
}
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: alvherre@alvh.no-ip.org, tgl@sss.pgh.pa.us, andres@anarazel.de, noah@leadboat.com, pg@bowt.ie, dgrowleyml@gmail.com, amit.kapila16@gmail.com, sawada.mshk@gmail.com
Subject: Re: Intermittent buildfarm failures on wrasse
In-Reply-To: <202204191637.eldwa2exvguw@alvherre.pgsql>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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