@@ -10,44 +10,41 @@ SET role = test2;
1010CREATE database reindexdb2;
1111\c reindexdb2
1212BEGIN;
13- SET role = test1 ;
13+ SET role = test2 ;
1414CREATE TABLE mytab1_heap(a int, b int);
1515CREATE INDEX idx_mytab1_heap ON mytab1_heap(b);
1616INSERT INTO mytab1_heap SELECT a , a - 10 FROM generate_series(1,100) a;
1717DELETE FROM mytab1_heap WHERE a % 4 = 0;
1818REVOKE ALL PRIVILEGES ON mytab1_heap FROM test2;
19- NOTICE: no privileges could be revoked
2019CREATE TABLE mytab1_ao(a int, b int) WITH (appendonly = TRUE);
2120CREATE INDEX idx_mytab1_ao ON mytab1_ao(b);
2221INSERT INTO mytab1_ao SELECT a , a - 10 FROM generate_series(1,100) a;
2322DELETE FROM mytab1_ao WHERE a % 4 = 0;
2423REVOKE ALL PRIVILEGES ON mytab1_ao FROM test2;
25- NOTICE: no privileges could be revoked
2624CREATE TABLE mytab1_aoco(a int, b int) WITH (appendonly = TRUE, orientation = COLUMN);
2725CREATE INDEX idx_mytab1_aoco ON mytab1_aoco(b);
2826INSERT INTO mytab1_aoco SELECT a , a - 10 FROM generate_series(1,100) a;
2927DELETE FROM mytab1_aoco WHERE a % 4 = 0;
3028REVOKE ALL PRIVILEGES ON mytab1_aoco FROM test2;
31- NOTICE: no privileges could be revoked
3229COMMIT;
3330SET role = test2;
3431SET client_min_messages=WARNING;
3532REINDEX DATABASE reindexdb2;
3633select usename as user_for_reindex_heap from pg_stat_operations where objname = 'idx_mytab1_heap' and subtype = 'REINDEX' ;
3734 user_for_reindex_heap
3835-----------------------
39- test1
36+ test2
4037(1 row)
4138
4239select usename as user_for_reindex_ao from pg_stat_operations where objname = 'idx_mytab1_ao' and subtype = 'REINDEX' ;
4340 user_for_reindex_ao
4441---------------------
45- test1
42+ test2
4643(1 row)
4744
4845select usename as user_for_reindex_aoco from pg_stat_operations where objname = 'idx_mytab1_aoco' and subtype = 'REINDEX' ;
4946 user_for_reindex_aoco
5047-----------------------
51- test1
48+ test2
5249(1 row)
5350
0 commit comments