Re: Non-robustness in pmsignal.c
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: pgsql-hackers@lists.postgresql.org
Date: 2022-10-08T00:49:18Z
Lists: pgsql-hackers
Andres Freund <andres@anarazel.de> writes: > On 2022-10-07 20:35:58 -0400, Tom Lane wrote: >> Andres Freund <andres@anarazel.de> writes: >>> Why are we even tracking PM_CHILD_UNUSED / PM_CHILD_ASSIGNED in shared memory? >> Because those flags are set by the child processes too, cf >> MarkPostmasterChildActive and MarkPostmasterChildInactive. > Only PM_CHILD_ACTIVE and PM_CHILD_WALSENDER though. We could afford another > MaxLivePostmasterChildren() sized array... Oh, I see what you mean --- one private and one public array. Maybe that makes more sense than what I did, not sure. >> I am, but I'm not inclined to push this immediately before a wrap. > +1 OK, I'll take a little more time on this and maybe code it up as you suggest. regards, tom lane
Commits
-
Harden pmsignal.c against clobbered shared memory.
- e7b4ff327c4d 15.1 landed
- b10546ecf826 14.6 landed
- ab35b9dd79b3 10.23 landed
- 8f98352b5ed9 12.13 landed
- 7442701374a4 13.9 landed
- 6c1de98bad93 11.18 landed
- 18a4a620e2de 16.0 landed