Re: Intermittent buildfarm failures on wrasse
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Andres Freund <andres@anarazel.de>, pgsql-hackers@lists.postgresql.org,
Noah Misch <noah@leadboat.com>, Peter Geoghegan <pg@bowt.ie>,
David Rowley <dgrowleyml@gmail.com>,
Amit Kapila <amit.kapila16@gmail.com>,
Masahiko Sawada <sawada.mshk@gmail.com>
Date: 2022-04-19T18:29:06Z
Lists: pgsql-hackers
Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
> 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?
Yeah, I thought about that too, but figured that the author probably
had a reason for writing the assertion the way it was. If we want
to redefine PROC_COPYABLE_FLAGS as "flags associated with xmin",
that's fine by me. But I'd suggest that both the name of the macro
and the comment for it in proc.h should be revised to match that
definition.
Another point is that as you've coded it, the code doesn't so much
copy those flags as union them with whatever the recipient had,
which seems wrong. I could go with either
Assert(!(MyProc->statusFlags & PROC_XMIN_FLAGS));
MyProc->statusFlags |= (proc->statusFlags & PROC_XMIN_FLAGS);
or
MyProc->statusFlags = (MyProc->statusFlags & ~PROC_XMIN_FLAGS) |
(proc->statusFlags & PROC_XMIN_FLAGS);
Perhaps the latter is more future-proof.
regards, tom lane
Commits
-
Repurpose PROC_COPYABLE_FLAGS as PROC_XMIN_FLAGS
- 8d9d1286acf9 14.4 landed
- 8d061acd12af 15.0 landed
- 5fd0cccc116b 13.8 landed
-
Tighten ComputeXidHorizons' handling of walsenders.
- 6fea65508a1a 15.0 landed
-
Adjust VACUUM's removable cutoff log message.
- 357c8455e649 15.0 landed
-
Temporarily add some probes of tenk1's relallvisible in create_index.sql.
- 5bb2b6abc8d6 15.0 landed
-
Set synchronous_commit=on in test_setup.sql.
- 02fea8fdda65 15.0 cited
-
Rearrange core regression tests to reduce cross-script dependencies.
- cc50080a828d 15.0 cited
-
snapshot scalability: Don't compute global horizons while building snapshots.
- dc7420c2c927 14.0 cited