Re: Adding locks statistics - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Adding locks statistics
Date
Msg-id adNQjbY7QvWe_W4m@paquier.xyz
Whole thread Raw
In response to Re: Adding locks statistics  (Andres Freund <andres@anarazel.de>)
Responses Re: Adding locks statistics
List pgsql-hackers
On Mon, Apr 06, 2026 at 01:22:23AM -0400, Andres Freund wrote:
> https://cirrus-ci.com/task/6253659454963712
>
https://api.cirrus-ci.com/v1/artifact/task/6253659454963712/testrun/build/testrun/test_misc/011_lock_stats/log/regress_log_011_lock_stats
>
> [04:33:31.756](0.067s) # die: error running SQL: 'psql:<stdin>:1: ERROR:  could not detach injection point
"deadlock-timeout-fired"'

I got a way to reproduce the same error pattern with the following
trick:
--- a/src/backend/utils/misc/injection_point.c
+++ b/src/backend/utils/misc/injection_point.c
@@ -357,6 +357,8 @@ InjectionPointDetach(const char *name)
    int         idx;
    int         max_inuse;

+   pg_usleep(5 * 1000000L);
+
    LWLockAcquire(InjectionPointLock, LW_EXCLUSIVE);

Now looking at it, and for the reason why 010 for concurrent indexes
does not complain..
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Xuneng Zhou
Date:
Subject: Re: tablecmds: fix bug where index rebuild loses replica identity on partitions
Next
From: Michael Paquier
Date:
Subject: Re: Adding locks statistics