From 5dee7a603f664115f8fe9819b0c19abd8209cd02 Mon Sep 17 00:00:00 2001 From: Álvaro Herrera Date: Tue, 2 Dec 2025 16:43:27 +0100 Subject: Avoid use of NOTICE to wait for snapshot invalidation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This idea (implemented in commits and bc32a12e0db2 and 9e8fa05d3412) of using notices to detect that a session is sleeping was unreliable, so simplify the concurrency controller session to just look at pg_stat_activity for a process sleeping on the injection point we want it to hit. This change allows us to remove a secondary injection point and the alternative expected output files. Reproduced by Alexander Lakhin following a report in buildfarm member skink (which runs the server under valgrind). Author: Mihail Nikalayeu Reported-by: Alexander Lakhin Reviewed-by: Álvaro Herrera Discussion: https://postgr.es/m/3e302c96-cdd2-45ec-af84-03dbcdccde4a@gmail.com --- src/backend/utils/time/snapmgr.c | 1 - 1 file changed, 1 deletion(-) (limited to 'src/backend/utils/time/snapmgr.c') diff --git a/src/backend/utils/time/snapmgr.c b/src/backend/utils/time/snapmgr.c index 434abbf6b6f..24f73a49d27 100644 --- a/src/backend/utils/time/snapmgr.c +++ b/src/backend/utils/time/snapmgr.c @@ -459,7 +459,6 @@ InvalidateCatalogSnapshot(void) pairingheap_remove(&RegisteredSnapshots, &CatalogSnapshot->ph_node); CatalogSnapshot = NULL; SnapshotResetXmin(); - INJECTION_POINT("pre-invalidate-catalog-snapshot-end", NULL); INJECTION_POINT("invalidate-catalog-snapshot-end", NULL); } } -- cgit v1.2.3