Commit f563afd4 authored by Simon Riggs's avatar Simon Riggs

Alter test results to comply with new ALTER TABLE behaviour.

parent 2c3d9db5
...@@ -1669,90 +1669,88 @@ and c.relname != 'my_locks' ...@@ -1669,90 +1669,88 @@ and c.relname != 'my_locks'
group by c.relname; group by c.relname;
create table alterlock (f1 int primary key, f2 text); create table alterlock (f1 int primary key, f2 text);
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "alterlock_pkey" for table "alterlock" NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "alterlock_pkey" for table "alterlock"
-- share update exclusive
begin; alter table alterlock alter column f2 set statistics 150; begin; alter table alterlock alter column f2 set statistics 150;
select * from my_locks order by 1; select * from my_locks order by 1;
relname | max_lockmode relname | max_lockmode
-----------+-------------------------- -----------+---------------------
alterlock | ShareUpdateExclusiveLock alterlock | AccessExclusiveLock
(1 row) (1 row)
rollback; rollback;
begin; alter table alterlock cluster on alterlock_pkey; begin; alter table alterlock cluster on alterlock_pkey;
select * from my_locks order by 1; select * from my_locks order by 1;
relname | max_lockmode relname | max_lockmode
----------------+-------------------------- ----------------+---------------------
alterlock | ShareUpdateExclusiveLock alterlock | AccessExclusiveLock
alterlock_pkey | ShareUpdateExclusiveLock alterlock_pkey | AccessExclusiveLock
(2 rows) (2 rows)
commit; commit;
begin; alter table alterlock set without cluster; begin; alter table alterlock set without cluster;
select * from my_locks order by 1; select * from my_locks order by 1;
relname | max_lockmode relname | max_lockmode
-----------+-------------------------- -----------+---------------------
alterlock | ShareUpdateExclusiveLock alterlock | AccessExclusiveLock
(1 row) (1 row)
commit; commit;
begin; alter table alterlock set (fillfactor = 100); begin; alter table alterlock set (fillfactor = 100);
select * from my_locks order by 1; select * from my_locks order by 1;
relname | max_lockmode relname | max_lockmode
-----------+-------------------------- -----------+---------------------
alterlock | ShareUpdateExclusiveLock alterlock | AccessExclusiveLock
pg_toast | ShareUpdateExclusiveLock pg_toast | AccessExclusiveLock
(2 rows) (2 rows)
commit; commit;
begin; alter table alterlock reset (fillfactor); begin; alter table alterlock reset (fillfactor);
select * from my_locks order by 1; select * from my_locks order by 1;
relname | max_lockmode relname | max_lockmode
-----------+-------------------------- -----------+---------------------
alterlock | ShareUpdateExclusiveLock alterlock | AccessExclusiveLock
pg_toast | ShareUpdateExclusiveLock pg_toast | AccessExclusiveLock
(2 rows) (2 rows)
commit; commit;
begin; alter table alterlock set (toast.autovacuum_enabled = off); begin; alter table alterlock set (toast.autovacuum_enabled = off);
select * from my_locks order by 1; select * from my_locks order by 1;
relname | max_lockmode relname | max_lockmode
-----------+-------------------------- -----------+---------------------
alterlock | ShareUpdateExclusiveLock alterlock | AccessExclusiveLock
pg_toast | ShareUpdateExclusiveLock pg_toast | AccessExclusiveLock
(2 rows) (2 rows)
commit; commit;
begin; alter table alterlock set (autovacuum_enabled = off); begin; alter table alterlock set (autovacuum_enabled = off);
select * from my_locks order by 1; select * from my_locks order by 1;
relname | max_lockmode relname | max_lockmode
-----------+-------------------------- -----------+---------------------
alterlock | ShareUpdateExclusiveLock alterlock | AccessExclusiveLock
pg_toast | ShareUpdateExclusiveLock pg_toast | AccessExclusiveLock
(2 rows) (2 rows)
commit; commit;
begin; alter table alterlock alter column f2 set (n_distinct = 1); begin; alter table alterlock alter column f2 set (n_distinct = 1);
select * from my_locks order by 1; select * from my_locks order by 1;
relname | max_lockmode relname | max_lockmode
-----------+-------------------------- -----------+---------------------
alterlock | ShareUpdateExclusiveLock alterlock | AccessExclusiveLock
(1 row) (1 row)
rollback; rollback;
begin; alter table alterlock alter column f2 set storage extended; begin; alter table alterlock alter column f2 set storage extended;
select * from my_locks order by 1; select * from my_locks order by 1;
relname | max_lockmode relname | max_lockmode
-----------+-------------------------- -----------+---------------------
alterlock | ShareUpdateExclusiveLock alterlock | AccessExclusiveLock
(1 row) (1 row)
rollback; rollback;
-- share row exclusive
begin; alter table alterlock alter column f2 set default 'x'; begin; alter table alterlock alter column f2 set default 'x';
select * from my_locks order by 1; select * from my_locks order by 1;
relname | max_lockmode relname | max_lockmode
-----------+----------------------- -----------+---------------------
alterlock | ShareRowExclusiveLock alterlock | AccessExclusiveLock
(1 row) (1 row)
rollback; rollback;
......
...@@ -1221,7 +1221,6 @@ group by c.relname; ...@@ -1221,7 +1221,6 @@ group by c.relname;
create table alterlock (f1 int primary key, f2 text); create table alterlock (f1 int primary key, f2 text);
-- share update exclusive
begin; alter table alterlock alter column f2 set statistics 150; begin; alter table alterlock alter column f2 set statistics 150;
select * from my_locks order by 1; select * from my_locks order by 1;
rollback; rollback;
...@@ -1258,7 +1257,6 @@ begin; alter table alterlock alter column f2 set storage extended; ...@@ -1258,7 +1257,6 @@ begin; alter table alterlock alter column f2 set storage extended;
select * from my_locks order by 1; select * from my_locks order by 1;
rollback; rollback;
-- share row exclusive
begin; alter table alterlock alter column f2 set default 'x'; begin; alter table alterlock alter column f2 set default 'x';
select * from my_locks order by 1; select * from my_locks order by 1;
rollback; rollback;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment