pgsql: Add TAP tests for log_lock_waits

From: Fujii Masao <fujii(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Add TAP tests for log_lock_waits
Date: 2026-04-06 14:50:43
Message-ID: E1w9lHm-003F61-18@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Add TAP tests for log_lock_waits

This commit updates 011_lock_stats.pl to verify log_lock_waits behavior.

The tests check that messages are emitted both when a wait occurs and
when the lock is acquired, and that the "still waiting for" message is logged
exactly once per wait, even if the backend wakes up during the wait.

The latter covers the behavior introduced by commit fd6ecbfa75f.

Author: Hüseyin Demir <huseyin(dot)d3r(at)gmail(dot)com>
Co-authored-by: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Discussion: https://postgr.es/m/CAB5wL7YB1my9W5k5i=SY+=sTjeozyJ0YkvGXrVfeDNzuRkoTPg@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/ca2b5443e2dcfc09692fd7b93753890b0b9633d2

Modified Files
--------------
src/test/modules/test_misc/t/011_lock_stats.pl | 69 +++++++++++++++++++++++++-
1 file changed, 68 insertions(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2026-04-06 14:55:02 Re: pgsql: Reduce log level of some logical decoding messages from LOG to D
Previous Message Aleksander Alekseev 2026-04-06 14:39:04 Re: pgsql: Online enabling and disabling of data checksums