summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKevin Grittner2015-08-06 15:47:47 +0000
committerKevin Grittner2015-08-06 15:47:47 +0000
commit253de7e1eb9abbcf57e6c229a8a38abd6455c7de (patch)
treeefa46ae26cfa5b9ac7af11a864a79a325d580c1e /src
parent3a145757a0cd19bfce770abeefa16af674e1bc09 (diff)
Fix `make installcheck` for serializable transactions.
Commit e5550d5fec66aa74caad1f79b79826ec64898688 added some new tests for ALTER TABLE which involved table scans. When default_transaction_isolation = 'serializable' these acquire relation-level SIReadLocks. The test results didn't cope with that. Add SIReadLock as the minimum lock level for purposes of these tests. This could also be fixed by excluding this type of lock from the my_locks view, but it would be a bug for SIReadLock to show up for a relation which was not otherwise locked, so do it this way to allow that sort of condition to cause a regression test failure. There is some question whether we could avoid taking SIReadLocks during these operations, but confirming the safety of that and figuring out how to avoid the locks is not trivial, and would be a separate patch. Backpatch to 9.4 where the new tests were added.
Diffstat (limited to 'src')
-rw-r--r--src/test/regress/expected/alter_table.out3
-rw-r--r--src/test/regress/sql/alter_table.sql3
2 files changed, 4 insertions, 2 deletions
diff --git a/src/test/regress/expected/alter_table.out b/src/test/regress/expected/alter_table.out
index 028d6ed85cd..47871b2be4f 100644
--- a/src/test/regress/expected/alter_table.out
+++ b/src/test/regress/expected/alter_table.out
@@ -1842,7 +1842,8 @@ DROP TABLE check_fk_presence_1, check_fk_presence_2;
drop type lockmodes;
ERROR: type "lockmodes" does not exist
create type lockmodes as enum (
- 'AccessShareLock'
+ 'SIReadLock'
+,'AccessShareLock'
,'RowShareLock'
,'RowExclusiveLock'
,'ShareUpdateExclusiveLock'
diff --git a/src/test/regress/sql/alter_table.sql b/src/test/regress/sql/alter_table.sql
index aefb5c93768..63cca34cd75 100644
--- a/src/test/regress/sql/alter_table.sql
+++ b/src/test/regress/sql/alter_table.sql
@@ -1271,7 +1271,8 @@ DROP TABLE check_fk_presence_1, check_fk_presence_2;
--
drop type lockmodes;
create type lockmodes as enum (
- 'AccessShareLock'
+ 'SIReadLock'
+,'AccessShareLock'
,'RowShareLock'
,'RowExclusiveLock'
,'ShareUpdateExclusiveLock'