tests: Restrict pg_locks queries in advisory_locks.sql to current database
authorAndres Freund <[email protected]>
Wed, 5 Oct 2022 17:44:38 +0000 (10:44 -0700)
committerMichael Paquier <[email protected]>
Thu, 26 Sep 2024 04:46:42 +0000 (13:46 +0900)
commit81487c83bed99d715b0122d2c49f36390e6c15ad
tree1c0349171ed9790a69c1361c723acd123e827937
parentef57a713580feb5f84f23882e6980cc31e74cf85
tests: Restrict pg_locks queries in advisory_locks.sql to current database

Otherwise testing an existing installation can fail, if there are other locks,
e.g. from one of the isolation tests.

This was originally applied as c3315a7da57b in 16~, but it is possible
to see this test fail depending on the concurrent activity for older
active branches.

Reviewed-by: Michael Paquier <[email protected]>
Discussion: https://postgr.es/m/20221003234111[email protected]
Backpatch-through: 12
src/test/regress/expected/advisory_lock.out
src/test/regress/sql/advisory_lock.sql