Re: Race conditions in 019_replslot_limit.pl
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: Masahiko Sawada <sawada.mshk@gmail.com>,
Kyotaro Horiguchi <horikyota.ntt@gmail.com>, hlinnaka@iki.fi,
pgsql-hackers@postgresql.org
Date: 2022-02-17T03:58:19Z
Lists: pgsql-hackers
Andres Freund <andres@anarazel.de> writes: > But right now I'm not seeing what prevents us from throwing a FATAL error > while holding an lwlock? If we're inside a transaction, then ShutdownPostgres -> AbortOutOfAnyTransaction would release LWLocks. I wonder though if an exiting walsender would always take that path. Maybe it'd be good if we released all LWLocks even if we don't think we're in a transaction? More generally, it wasn't obvious to me why you thought that BaseInit was a good spot to place the on_shmem_exit call. It obviously can't be *before* that because of the pgstats dependency, but maybe it should be later? regards, tom lane
Commits
-
Revert 019_replslot_limit.pl related debugging aids.
- 49ddd9876362 15.0 landed
- 3f8148c256e0 16.0 landed
-
Don't fail for > 1 walsenders in 019_replslot_limit, add debug messages.
- 91c0570a7911 15.0 landed
-
Add retries for further investigation of 019_replslot_limit.pl failures.
- f28bf667f602 15.0 landed
-
Add further debug info to help debug 019_replslot_limit.pl failures.
- fe0972ee5e6f 15.0 landed
-
Add temporary debug info to help debug 019_replslot_limit.pl failures.
- afdeff10526e 15.0 landed
-
Move replication slot release to before_shmem_exit().
- 2f6501fa3c54 15.0 cited
-
Server-side fix for delayed NOTIFY and SIGTERM processing.
- 2ddb9149d14d 12.0 cited