Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit f246d37

Browse files
committed
pg_get_snapshot_timestamp() test
1 parent cb68f93 commit f246d37

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# The recent just created snapshot cannot be older than 1 minute :)
2+
3+
teardown {
4+
select pg_remove_snapshot( ( select recent_snapshot from pg_control_snapshot() ) );
5+
}
6+
7+
session "s1"
8+
step "s1_mk_sn" {
9+
select 1 as "make_snapshot" from pg_make_snapshot();
10+
select ( now() - ( select pg_get_snapshot_timestamp( ( select recent_snapshot from pg_control_snapshot() ) ) ) ) between '0 sec'::interval and '1 min'::interval as "timestamp_check"
11+
}
12+
step "s1_rc_sn_1" {
13+
select pg_recover_to_snapshot( ( select recent_snapshot from pg_control_snapshot() ) );
14+
}
15+
16+
permutation "s1_mk_sn"

0 commit comments

Comments
 (0)