mirror of
https://github.com/postgres/postgres.git
synced 2025-07-03 20:02:46 +03:00
Add further debug info to help debug 019_replslot_limit.pl failures.
See also afdeff1052
. Failures after that commit provided a few more hints,
but not yet enough to understand what's going on.
In 019_replslot_limit.pl shut down nodes with fast instead of immediate mode
if we observe the failure mode. That should tell us whether the failures we're
observing are just a timing issue under high load. PGCTLTIMEOUT should prevent
buildfarm animals from hanging endlessly.
Also adds a bit more logging to replication slot drop and ShutdownPostgres().
Discussion: https://postgr.es/m/20220225192941.hqnvefgdzaro6gzg@alap3.anarazel.de
This commit is contained in:
@ -1262,6 +1262,23 @@ ShutdownPostgres(int code, Datum arg)
|
||||
* them explicitly.
|
||||
*/
|
||||
LockReleaseAll(USER_LOCKMETHOD, true);
|
||||
|
||||
/*
|
||||
* temp debugging aid to analyze 019_replslot_limit failures
|
||||
*
|
||||
* If an error were thrown outside of a transaction nothing up to now
|
||||
* would have released lwlocks. We probably will add an
|
||||
* LWLockReleaseAll(). But for now make it easier to understand such cases
|
||||
* by warning if any lwlocks are held.
|
||||
*/
|
||||
#ifdef USE_ASSERT_CHECKING
|
||||
{
|
||||
int held_lwlocks = LWLockHeldCount();
|
||||
if (held_lwlocks)
|
||||
elog(WARNING, "holding %d lwlocks at the end of ShutdownPostgres()",
|
||||
held_lwlocks);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user