This is an automated email from the ASF dual-hosted git repository. gfphoenix78 pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/cloudberry.git
The following commit(s) were added to refs/heads/main by this push: new 49a013521d Update the relation pattern to be more precise (#1106) 49a013521d is described below commit 49a013521d0d3534cb68686dbe37e9760ecff434 Author: Hao Wu <gfphoeni...@gmail.com> AuthorDate: Fri May 16 18:12:56 2025 +0800 Update the relation pattern to be more precise (#1106) Update the relation pattern to be more precise The pattern '%lock_%' intends to match the view/table names like 'lock_xxx'. The underscore also matches arbitrary string in the pattern. It needs slash to escape '_' --- contrib/pax_storage/src/test/regress/expected/lock.out | 12 ++++++------ contrib/pax_storage/src/test/regress/parallel_schedule | 2 -- contrib/pax_storage/src/test/regress/sql/lock.sql | 12 ++++++------ 3 files changed, 12 insertions(+), 14 deletions(-) diff --git a/contrib/pax_storage/src/test/regress/expected/lock.out b/contrib/pax_storage/src/test/regress/expected/lock.out index 838a7258fa..77326bca26 100644 --- a/contrib/pax_storage/src/test/regress/expected/lock.out +++ b/contrib/pax_storage/src/test/regress/expected/lock.out @@ -42,7 +42,7 @@ BEGIN TRANSACTION; LOCK TABLE lock_view1 IN EXCLUSIVE MODE; -- lock_view1 and lock_tbl1 are locked. select l.gp_segment_id, relname from pg_locks l, pg_class c - where l.relation = c.oid and relname like '%lock_%' and mode = 'ExclusiveLock' + where l.relation = c.oid and relname like 'lock\_%' and mode = 'ExclusiveLock' order by relname; gp_segment_id | relname ---------------+------------ @@ -61,7 +61,7 @@ BEGIN TRANSACTION; LOCK TABLE lock_view2 IN EXCLUSIVE MODE; -- lock_view1, lock_tbl1, and lock_tbl1a are locked. select l.gp_segment_id, relname from pg_locks l, pg_class c - where l.relation = c.oid and relname like '%lock_%' and mode = 'ExclusiveLock' + where l.relation = c.oid and relname like 'lock\_%' and mode = 'ExclusiveLock' order by relname; gp_segment_id | relname ---------------+------------ @@ -84,7 +84,7 @@ BEGIN TRANSACTION; LOCK TABLE lock_view3 IN EXCLUSIVE MODE; -- lock_view3, lock_view2, lock_tbl1, and lock_tbl1a are locked recursively. select l.gp_segment_id, relname from pg_locks l, pg_class c - where l.relation = c.oid and relname like '%lock_%' and mode = 'ExclusiveLock' + where l.relation = c.oid and relname like 'lock\_%' and mode = 'ExclusiveLock' order by relname; gp_segment_id | relname ---------------+------------ @@ -111,7 +111,7 @@ BEGIN TRANSACTION; LOCK TABLE lock_view4 IN EXCLUSIVE MODE; -- lock_view4, lock_tbl1, and lock_tbl1a are locked. select l.gp_segment_id, relname from pg_locks l, pg_class c - where l.relation = c.oid and relname like '%lock_%' and mode = 'ExclusiveLock' + where l.relation = c.oid and relname like 'lock\_%' and mode = 'ExclusiveLock' order by relname; gp_segment_id | relname ---------------+------------ @@ -134,7 +134,7 @@ BEGIN TRANSACTION; LOCK TABLE lock_view5 IN EXCLUSIVE MODE; -- lock_view5, lock_tbl1, and lock_tbl1a are locked. select l.gp_segment_id, relname from pg_locks l, pg_class c - where l.relation = c.oid and relname like '%lock_%' and mode = 'ExclusiveLock' + where l.relation = c.oid and relname like 'lock\_%' and mode = 'ExclusiveLock' order by relname; gp_segment_id | relname ---------------+------------ @@ -157,7 +157,7 @@ BEGIN TRANSACTION; LOCK TABLE lock_view6 IN EXCLUSIVE MODE; -- lock_view6 an lock_tbl1 are locked. select l.gp_segment_id, relname from pg_locks l, pg_class c - where l.relation = c.oid and relname like '%lock_%' and mode = 'ExclusiveLock' + where l.relation = c.oid and relname like 'lock\_%' and mode = 'ExclusiveLock' order by relname; gp_segment_id | relname ---------------+------------ diff --git a/contrib/pax_storage/src/test/regress/parallel_schedule b/contrib/pax_storage/src/test/regress/parallel_schedule index 7c51164d7c..49a67284ac 100644 --- a/contrib/pax_storage/src/test/regress/parallel_schedule +++ b/contrib/pax_storage/src/test/regress/parallel_schedule @@ -113,9 +113,7 @@ test: transactions # ---------- # Another group of parallel tests # ---------- -test: disable_autovacuum test: privileges init_privs security_label collate lock replica_identity rowsecurity object_address tablesample groupingsets drop_operator password identity appendonly_sample aocs_sample -test: enable_autovacuum test: matview # ignore reason: diff --git a/contrib/pax_storage/src/test/regress/sql/lock.sql b/contrib/pax_storage/src/test/regress/sql/lock.sql index a7c9f8fab4..11b5a6b21a 100644 --- a/contrib/pax_storage/src/test/regress/sql/lock.sql +++ b/contrib/pax_storage/src/test/regress/sql/lock.sql @@ -46,42 +46,42 @@ BEGIN TRANSACTION; LOCK TABLE lock_view1 IN EXCLUSIVE MODE; -- lock_view1 and lock_tbl1 are locked. select l.gp_segment_id, relname from pg_locks l, pg_class c - where l.relation = c.oid and relname like '%lock_%' and mode = 'ExclusiveLock' + where l.relation = c.oid and relname like 'lock\_%' and mode = 'ExclusiveLock' order by relname; ROLLBACK; BEGIN TRANSACTION; LOCK TABLE lock_view2 IN EXCLUSIVE MODE; -- lock_view1, lock_tbl1, and lock_tbl1a are locked. select l.gp_segment_id, relname from pg_locks l, pg_class c - where l.relation = c.oid and relname like '%lock_%' and mode = 'ExclusiveLock' + where l.relation = c.oid and relname like 'lock\_%' and mode = 'ExclusiveLock' order by relname; ROLLBACK; BEGIN TRANSACTION; LOCK TABLE lock_view3 IN EXCLUSIVE MODE; -- lock_view3, lock_view2, lock_tbl1, and lock_tbl1a are locked recursively. select l.gp_segment_id, relname from pg_locks l, pg_class c - where l.relation = c.oid and relname like '%lock_%' and mode = 'ExclusiveLock' + where l.relation = c.oid and relname like 'lock\_%' and mode = 'ExclusiveLock' order by relname; ROLLBACK; BEGIN TRANSACTION; LOCK TABLE lock_view4 IN EXCLUSIVE MODE; -- lock_view4, lock_tbl1, and lock_tbl1a are locked. select l.gp_segment_id, relname from pg_locks l, pg_class c - where l.relation = c.oid and relname like '%lock_%' and mode = 'ExclusiveLock' + where l.relation = c.oid and relname like 'lock\_%' and mode = 'ExclusiveLock' order by relname; ROLLBACK; BEGIN TRANSACTION; LOCK TABLE lock_view5 IN EXCLUSIVE MODE; -- lock_view5, lock_tbl1, and lock_tbl1a are locked. select l.gp_segment_id, relname from pg_locks l, pg_class c - where l.relation = c.oid and relname like '%lock_%' and mode = 'ExclusiveLock' + where l.relation = c.oid and relname like 'lock\_%' and mode = 'ExclusiveLock' order by relname; ROLLBACK; BEGIN TRANSACTION; LOCK TABLE lock_view6 IN EXCLUSIVE MODE; -- lock_view6 an lock_tbl1 are locked. select l.gp_segment_id, relname from pg_locks l, pg_class c - where l.relation = c.oid and relname like '%lock_%' and mode = 'ExclusiveLock' + where l.relation = c.oid and relname like 'lock\_%' and mode = 'ExclusiveLock' order by relname; ROLLBACK; -- Verify that we cope with infinite recursion in view definitions. --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cloudberry.apache.org For additional commands, e-mail: commits-h...@cloudberry.apache.org