RE: BUG #17947: Combination of replslots pgstat issues causes error/assertion failure
Floris Van Nee <florisvannee@optiver.com>
From: Floris Van Nee <florisvannee@Optiver.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Andres Freund <andres@anarazel.de>,
Kyotaro Horiguchi <horikyota.ntt@gmail.com>,
"exclusion@gmail.com" <exclusion@gmail.com>,
"pgsql-bugs@lists.postgresql.org" <pgsql-bugs@lists.postgresql.org>
Date: 2024-06-05T10:24:43Z
Lists: pgsql-bugs
> > Note an extra edge case in pgstat_init_function_usage(), which should do > the same, I guess? > I noticed it but wasn't sure if it was necessary here due to the exceptional case here. It raises ereport error right after and can only reach this if the entry was created In the call to pgstat_prep_pending_entry before it, so it seems unlikely another backend holds a ref to it. I might be wrong though. > Attached is an updated patch with refined comments at the top of ? > pgstat_drop_entry(), to be applied to 15~. Thanks for testing the patch. Updated patch looks good to me. -Floris
Commits
-
Fix race conditions with drop of reused pgstats entries
- 154c5b42a3d8 15.10 landed
- afa20845dd13 16.6 landed
- 1d6a03ea4146 17.2 landed
- 818119afccd3 18.0 landed
-
Prevent inconsistent use of stats entry for replication slots
- bfc44da24789 15.8 landed
- f2c922ff2fed 16.4 landed
- cd312adc561a 17.0 landed
-
pgstat: store statistics in shared memory.
- 5891c7a8ed8f 15.0 cited