File tree 4 files changed +41
-11
lines changed
4 files changed +41
-11
lines changed Original file line number Diff line number Diff line change 93
93
#include "storage/procsignal.h"
94
94
#include "storage/sinvaladt.h"
95
95
#include "storage/smgr.h"
96
+ #include "storage/snapfs.h"
96
97
#include "tcop/tcopprot.h"
97
98
#include "utils/fmgroids.h"
98
99
#include "utils/fmgrprotos.h"
@@ -1957,7 +1958,11 @@ do_autovacuum(void)
1957
1958
bool found_concurrent_worker = false;
1958
1959
int i ;
1959
1960
1960
- /*
1961
+ /* Do not perform autovacuum in snapshot */
1962
+ if (!SFS_IN_SNAPSHOT ())
1963
+ return ;
1964
+
1965
+ /*
1961
1966
* StartTransactionCommand and CommitTransactionCommand will automatically
1962
1967
* switch to other contexts. We need this one to keep the list of
1963
1968
* relations to vacuum/analyze across transactions.
Original file line number Diff line number Diff line change @@ -62,6 +62,13 @@ step s1_check:
62
62
63
63
grantee grantor privilege_type tableowner
64
64
65
+ test_owner test_owner DELETE test_owner
66
+ test_owner test_owner INSERT test_owner
67
+ test_owner test_owner REFERENCES test_owner
68
+ test_owner test_owner SELECT test_owner
69
+ test_owner test_owner TRIGGER test_owner
70
+ test_owner test_owner TRUNCATE test_owner
71
+ test_owner test_owner UPDATE test_owner
65
72
cnt
66
73
67
74
10
@@ -182,6 +189,13 @@ step s1_check:
182
189
183
190
grantee grantor privilege_type tableowner
184
191
192
+ test_owner test_owner DELETE test_owner
193
+ test_owner test_owner INSERT test_owner
194
+ test_owner test_owner REFERENCES test_owner
195
+ test_owner test_owner SELECT test_owner
196
+ test_owner test_owner TRIGGER test_owner
197
+ test_owner test_owner TRUNCATE test_owner
198
+ test_owner test_owner UPDATE test_owner
185
199
cnt
186
200
187
201
10
Original file line number Diff line number Diff line change 1
1
Parsed test spec with 3 sessions
2
2
3
- starting permutation: s3_mk_sn s1_cr s3_mk_sn s1_check s1_ar s3_mk_sn s1_dr s1_check s2_check s3_sw_1 s1_check s2_check s3_sw_2 s1_check s2_check s3_sw_3 s1_check s2_check s3_sw_0 s1_check s2_check
3
+ starting permutation: s3_mk_sn s1_cr s3_mk_sn s1_check s1_ar s3_mk_sn s1_dr s1_check s2_check s3_sw_1 s1_check s2_check s3_sw_2 s1_check s2_check s3_sw_3 s1_check s2_check s3_sw_0 s1_check s2_check s3_teardown
4
4
step s3_mk_sn:
5
5
select 1 from pg_make_snapshot();
6
6
@@ -113,11 +113,18 @@ step s2_check:
113
113
114
114
rolname rolcanlogin
115
115
116
+ step s3_teardown:
117
+ select pg_switch_to_snapshot( 0 );
118
+ select pg_remove_snapshot( ( select recent_snapshot from pg_control_snapshot() ) );
119
+
120
+ pg_switch_to_snapshot
121
+
122
+
116
123
pg_remove_snapshot
117
124
118
125
119
126
120
- starting permutation: s3_mk_sn s1_cr s3_mk_sn s1_check s1_ar s3_mk_sn s1_dr s1_check s2_check s3_rc_sn_2 s1_check s2_check
127
+ starting permutation: s3_mk_sn s1_cr s3_mk_sn s1_check s1_ar s3_mk_sn s1_dr s1_check s2_check s3_rc_sn_2 s1_check s2_check s3_rc_sn
121
128
step s3_mk_sn:
122
129
select 1 from pg_make_snapshot();
123
130
@@ -173,11 +180,16 @@ step s1_check:
173
180
174
181
rolname rolcanlogin
175
182
183
+ regressuser1 f
176
184
step s2_check:
177
185
select rolname, rolcanlogin from pg_roles where rolname in ( 'regressuser1', 'regressuser2' );
178
186
179
187
rolname rolcanlogin
180
188
181
- pg_remove_snapshot
189
+ regressuser1 f
190
+ step s3_rc_sn:
191
+ select pg_recover_to_snapshot( ( select recent_snapshot from pg_control_snapshot() ) );
192
+
193
+ pg_recover_to_snapshot
182
194
183
195
Original file line number Diff line number Diff line change 1
1
# Role and permissions checks
2
2
# We are using three backends: read-write, read, snapshot.
3
3
4
- teardown {
5
- select pg_switch_to_snapshot ( 0 );
6
- select pg_remove_snapshot ( ( select recent_snapshot from pg_control_snapshot () ) );
7
- }
8
-
9
4
session "s1"
10
5
step "s1_cr" {
11
6
create role regressuser1 nologin ;
@@ -75,9 +70,13 @@ step "s3_rc_sn_1" {
75
70
step "s3_rc_sn_2" {
76
71
select pg_recover_to_snapshot ( ( select recent_snapshot - 1 from pg_control_snapshot () ) );
77
72
}
73
+ step "s3_teardown" {
74
+ select pg_switch_to_snapshot ( 0 );
75
+ select pg_remove_snapshot ( ( select recent_snapshot from pg_control_snapshot () ) );
76
+ }
78
77
79
- permutation "s3_mk_sn" "s1_cr" "s3_mk_sn" "s1_check" "s1_ar" "s3_mk_sn" "s1_dr" "s1_check" "s2_check" "s3_sw_1" "s1_check" "s2_check" "s3_sw_2" "s1_check" "s2_check" "s3_sw_3" "s1_check" "s2_check" "s3_sw_0" "s1_check" "s2_check"
78
+ permutation "s3_mk_sn" "s1_cr" "s3_mk_sn" "s1_check" "s1_ar" "s3_mk_sn" "s1_dr" "s1_check" "s2_check" "s3_sw_1" "s1_check" "s2_check" "s3_sw_2" "s1_check" "s2_check" "s3_sw_3" "s1_check" "s2_check" "s3_sw_0" "s1_check" "s2_check" "s3_teardown"
80
79
#permutation "s3_mk_sn" "s1_cr" "s3_mk_sn" "s1_check" "s1_ar" "s3_mk_sn" "s1_dr" "s1_check" "s2_check" "s1_sb_1" "s1_check" "s2_check" "s1_sb_2" "s1_check" "s2_check" "s1_sb_3" "s1_check" "s2_check" "s1_sb_0" "s1_check" "s2_check"
81
80
#permutation "s3_mk_sn" "s1_cr" "s3_mk_sn" "s1_check" "s1_ar" "s3_mk_sn" "s1_dr" "s1_check" "s2_check" "s2_sb_1" "s1_check" "s2_check" "s2_sb_2" "s1_check" "s2_check" "s2_sb_3" "s1_check" "s2_check" "s2_sb_0" "s1_check" "s2_check"
82
- permutation "s3_mk_sn" "s1_cr" "s3_mk_sn" "s1_check" "s1_ar" "s3_mk_sn" "s1_dr" "s1_check" "s2_check" "s3_rc_sn_2" "s1_check" "s2_check"
81
+ permutation "s3_mk_sn" "s1_cr" "s3_mk_sn" "s1_check" "s1_ar" "s3_mk_sn" "s1_dr" "s1_check" "s2_check" "s3_rc_sn_2" "s1_check" "s2_check" "s3_rc_sn"
83
82
#permutation "s3_mk_sn" "s1_cr" "s3_mk_sn" "s1_check" "s1_ar" "s3_mk_sn" "s1_dr" "s1_check" "s2_check" "s3_rc_sn" "s1_check" "s2_check" "s3_rc_sn" "s1_check" "s2_check" "s3_rc_sn" "s1_check" "s2_check" "s3_mk_sn"
You can’t perform that action at this time.
0 commit comments