@@ -3,10 +3,10 @@ SET synchronous_commit = on;
3
3
4
4
SELECT ' init' FROM pg_create_logical_replication_slot(' regression_slot' ,' test_decoding' );
5
5
6
- -- bug #13844, xids in non-decoded records need to be inspected
7
6
CREATE TABLE xact_test (datatext );
8
7
INSERT INTO xact_testVALUES (' before-test' );
9
8
9
+ -- bug #13844, xids in non-decoded records need to be inspected
10
10
BEGIN ;
11
11
-- perform operation in xact that creates and logs xid, but isn't decoded
12
12
SELECT * FROM xact_test FORUPDATE ;
@@ -17,6 +17,17 @@ COMMIT;
17
17
-- and now show those changes
18
18
SELECT dataFROM pg_logical_slot_get_changes(' regression_slot' ,NULL ,NULL ,' include-xids' ,' 0' ,' skip-empty-xacts' ,' 1' );
19
19
20
+ -- bug #14279, do not propagate null snapshot from subtransaction
21
+ BEGIN ;
22
+ -- first insert
23
+ INSERT INTO xact_testVALUES (' main-txn' );
24
+ SAVEPOINT foo;
25
+ -- now perform operation in subxact that creates and logs xid, but isn't decoded
26
+ SELECT 1 FROM xact_test FORUPDATE LIMIT 1 ;
27
+ COMMIT ;
28
+ -- and now show those changes
29
+ SELECT dataFROM pg_logical_slot_get_changes(' regression_slot' ,NULL ,NULL ,' include-xids' ,' 0' ,' skip-empty-xacts' ,' 1' );
30
+
20
31
DROP TABLE xact_test;
21
32
22
33
SELECT pg_drop_replication_slot(' regression_slot' );