Stabilize test_decoding touching with sequences
Some of the test_decoding regression tests are unstable due to modifying a sequence. The first increment of a sequence after a checkpoint is always logged (and thus decoded), which makes the output unpredictable. The runs are usually much shorter than a checkpoint internal, so these failures are rare, but we've seen a couple of them on animals that are either slow or are running with valgrind/clobber cache/... Fixed by skipping sequence decoding in most tests, with the exception of the test aimed at testing decoding of sequences. Reported-by: Amita Kapila Discussion: https://postgr.es/m/d045f3c2-6cfb-06d3-5540-e63c320df8bc@enterprisedb.com
This commit is contained in:
parent
54c72eb5e5
commit
a180c2b34d
File diff suppressed because one or more lines are too long
@ -68,7 +68,7 @@ SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'inc
|
|||||||
|
|
||||||
COMMIT;
|
COMMIT;
|
||||||
INSERT INTO nobarf(data) VALUES('3');
|
INSERT INTO nobarf(data) VALUES('3');
|
||||||
SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1');
|
SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1', 'include-sequences', '0');
|
||||||
data
|
data
|
||||||
-----------------------------------------------------------
|
-----------------------------------------------------------
|
||||||
BEGIN
|
BEGIN
|
||||||
|
@ -110,7 +110,7 @@ SELECT pg_replication_origin_xact_setup('0/aabbccdd', '2013-01-01 00:00');
|
|||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
INSERT INTO target_tbl(data)
|
INSERT INTO target_tbl(data)
|
||||||
SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1', 'only-local', '1');
|
SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1', 'only-local', '1', 'include-sequences', '0');
|
||||||
COMMIT;
|
COMMIT;
|
||||||
-- check replication progress for the session is correct
|
-- check replication progress for the session is correct
|
||||||
SELECT pg_replication_origin_session_progress(false);
|
SELECT pg_replication_origin_session_progress(false);
|
||||||
@ -154,14 +154,14 @@ SELECT pg_replication_origin_progress('regress_test_decoding: regression_slot',
|
|||||||
SELECT pg_replication_origin_session_reset();
|
SELECT pg_replication_origin_session_reset();
|
||||||
ERROR: no replication origin is configured
|
ERROR: no replication origin is configured
|
||||||
-- and magically the replayed xact will be filtered!
|
-- and magically the replayed xact will be filtered!
|
||||||
SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1', 'only-local', '1');
|
SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1', 'only-local', '1', 'include-sequences', '0');
|
||||||
data
|
data
|
||||||
------
|
------
|
||||||
(0 rows)
|
(0 rows)
|
||||||
|
|
||||||
--but new original changes still show up
|
--but new original changes still show up
|
||||||
INSERT INTO origin_tbl(data) VALUES ('will be replicated');
|
INSERT INTO origin_tbl(data) VALUES ('will be replicated');
|
||||||
SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1', 'only-local', '1');
|
SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1', 'only-local', '1', 'include-sequences', '0');
|
||||||
data
|
data
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
BEGIN
|
BEGIN
|
||||||
@ -227,7 +227,7 @@ SELECT local_id, external_id,
|
|||||||
1 | regress_test_decoding: regression_slot_no_lsn | f | t
|
1 | regress_test_decoding: regression_slot_no_lsn | f | t
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT data FROM pg_logical_slot_get_changes('regression_slot_no_lsn', NULL, NULL, 'skip-empty-xacts', '1', 'include-xids', '0');
|
SELECT data FROM pg_logical_slot_get_changes('regression_slot_no_lsn', NULL, NULL, 'skip-empty-xacts', '1', 'include-xids', '0', 'include-sequences', '0');
|
||||||
data
|
data
|
||||||
-------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------
|
||||||
BEGIN
|
BEGIN
|
||||||
|
@ -115,7 +115,7 @@ INSERT INTO replication_example(somedata, testcolumn1, testcolumn3) VALUES (7, 5
|
|||||||
COMMIT;
|
COMMIT;
|
||||||
-- make old files go away
|
-- make old files go away
|
||||||
CHECKPOINT;
|
CHECKPOINT;
|
||||||
SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1');
|
SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1', 'include-sequences', '0');
|
||||||
data
|
data
|
||||||
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
BEGIN
|
BEGIN
|
||||||
|
@ -107,7 +107,7 @@ SELECT data FROM pg_logical_slot_get_changes('regression_slot1', NULL, NULL, 'in
|
|||||||
COMMIT
|
COMMIT
|
||||||
(7 rows)
|
(7 rows)
|
||||||
|
|
||||||
SELECT data FROM pg_logical_slot_get_changes('regression_slot2', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1');
|
SELECT data FROM pg_logical_slot_get_changes('regression_slot2', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1', 'include-sequences', '0');
|
||||||
data
|
data
|
||||||
---------------------------------------------------------------------------------------------------------
|
---------------------------------------------------------------------------------------------------------
|
||||||
BEGIN
|
BEGIN
|
||||||
@ -132,7 +132,7 @@ SELECT :'wal_lsn' = :'end_lsn';
|
|||||||
t
|
t
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT data FROM pg_logical_slot_get_changes('regression_slot1', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1');
|
SELECT data FROM pg_logical_slot_get_changes('regression_slot1', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1', 'include-sequences', '0');
|
||||||
data
|
data
|
||||||
---------------------------------------------------------------------------------------------------------
|
---------------------------------------------------------------------------------------------------------
|
||||||
BEGIN
|
BEGIN
|
||||||
@ -140,7 +140,7 @@ SELECT data FROM pg_logical_slot_get_changes('regression_slot1', NULL, NULL, 'in
|
|||||||
COMMIT
|
COMMIT
|
||||||
(3 rows)
|
(3 rows)
|
||||||
|
|
||||||
SELECT data FROM pg_logical_slot_get_changes('regression_slot2', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1');
|
SELECT data FROM pg_logical_slot_get_changes('regression_slot2', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1', 'include-sequences', '0');
|
||||||
data
|
data
|
||||||
------
|
------
|
||||||
(0 rows)
|
(0 rows)
|
||||||
|
@ -19,7 +19,7 @@ SELECT pg_drop_replication_slot('regression_slot');
|
|||||||
|
|
||||||
-- check that we're detecting a streaming rep slot used for logical decoding
|
-- check that we're detecting a streaming rep slot used for logical decoding
|
||||||
SELECT 'init' FROM pg_create_physical_replication_slot('repl');
|
SELECT 'init' FROM pg_create_physical_replication_slot('repl');
|
||||||
SELECT data FROM pg_logical_slot_get_changes('repl', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1');
|
SELECT data FROM pg_logical_slot_get_changes('repl', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1', 'include-sequences', '0');
|
||||||
SELECT pg_drop_replication_slot('repl');
|
SELECT pg_drop_replication_slot('repl');
|
||||||
|
|
||||||
|
|
||||||
@ -68,7 +68,7 @@ SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'inc
|
|||||||
|
|
||||||
ALTER TABLE replication_example ALTER COLUMN somenum TYPE int4 USING (somenum::int4);
|
ALTER TABLE replication_example ALTER COLUMN somenum TYPE int4 USING (somenum::int4);
|
||||||
-- check that this doesn't produce any changes from the heap rewrite
|
-- check that this doesn't produce any changes from the heap rewrite
|
||||||
SELECT count(data) FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1');
|
SELECT count(data) FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1', 'include-sequences', '0');
|
||||||
|
|
||||||
INSERT INTO replication_example(somedata, somenum) VALUES (5, 1);
|
INSERT INTO replication_example(somedata, somenum) VALUES (5, 1);
|
||||||
|
|
||||||
@ -82,7 +82,7 @@ INSERT INTO replication_example(somedata, somenum, zaphod1) VALUES (6, 4, 2);
|
|||||||
COMMIT;
|
COMMIT;
|
||||||
|
|
||||||
-- show changes
|
-- show changes
|
||||||
SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1');
|
SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1', 'include-sequences', '0');
|
||||||
|
|
||||||
-- ON CONFLICT DO UPDATE support
|
-- ON CONFLICT DO UPDATE support
|
||||||
BEGIN;
|
BEGIN;
|
||||||
@ -91,7 +91,7 @@ INSERT INTO replication_example(id, somedata, somenum) SELECT i, i, i FROM gener
|
|||||||
COMMIT;
|
COMMIT;
|
||||||
|
|
||||||
/* display results */
|
/* display results */
|
||||||
SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1');
|
SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1', 'include-sequences', '0');
|
||||||
|
|
||||||
CREATE TABLE tr_unique(id2 serial unique NOT NULL, data int);
|
CREATE TABLE tr_unique(id2 serial unique NOT NULL, data int);
|
||||||
INSERT INTO tr_unique(data) VALUES(10);
|
INSERT INTO tr_unique(data) VALUES(10);
|
||||||
@ -104,7 +104,7 @@ INSERT INTO tr_pkey(data) VALUES(1);
|
|||||||
DELETE FROM tr_pkey;
|
DELETE FROM tr_pkey;
|
||||||
|
|
||||||
/* display results */
|
/* display results */
|
||||||
SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1');
|
SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1', 'include-sequences', '0');
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* check that disk spooling works (also for logical messages)
|
* check that disk spooling works (also for logical messages)
|
||||||
@ -136,7 +136,7 @@ DROP TABLE spoolme;
|
|||||||
COMMIT;
|
COMMIT;
|
||||||
|
|
||||||
SELECT data
|
SELECT data
|
||||||
FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1')
|
FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1', 'include-sequences', '0')
|
||||||
WHERE data ~ 'UPDATE';
|
WHERE data ~ 'UPDATE';
|
||||||
|
|
||||||
-- check that a large, spooled, upsert works
|
-- check that a large, spooled, upsert works
|
||||||
@ -145,7 +145,7 @@ SELECT g.i, -g.i FROM generate_series(8000, 12000) g(i)
|
|||||||
ON CONFLICT(id) DO UPDATE SET data = EXCLUDED.data;
|
ON CONFLICT(id) DO UPDATE SET data = EXCLUDED.data;
|
||||||
|
|
||||||
SELECT substring(data, 1, 29), count(*)
|
SELECT substring(data, 1, 29), count(*)
|
||||||
FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1') WITH ORDINALITY
|
FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1', 'include-sequences', '0') WITH ORDINALITY
|
||||||
GROUP BY 1
|
GROUP BY 1
|
||||||
ORDER BY min(ordinality);
|
ORDER BY min(ordinality);
|
||||||
|
|
||||||
@ -202,7 +202,7 @@ RELEASE SAVEPOINT subtop;
|
|||||||
INSERT INTO tr_sub(path) VALUES ('2-top-#1');
|
INSERT INTO tr_sub(path) VALUES ('2-top-#1');
|
||||||
COMMIT;
|
COMMIT;
|
||||||
|
|
||||||
SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1');
|
SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1', 'include-sequences', '0');
|
||||||
|
|
||||||
-- make sure rollbacked subtransactions aren't decoded
|
-- make sure rollbacked subtransactions aren't decoded
|
||||||
BEGIN;
|
BEGIN;
|
||||||
@ -215,7 +215,7 @@ ROLLBACK TO SAVEPOINT b;
|
|||||||
INSERT INTO tr_sub(path) VALUES ('3-top-2-#2');
|
INSERT INTO tr_sub(path) VALUES ('3-top-2-#2');
|
||||||
COMMIT;
|
COMMIT;
|
||||||
|
|
||||||
SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1');
|
SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1', 'include-sequences', '0');
|
||||||
|
|
||||||
-- test whether a known, but not yet logged toplevel xact, followed by a
|
-- test whether a known, but not yet logged toplevel xact, followed by a
|
||||||
-- subxact commit is handled correctly
|
-- subxact commit is handled correctly
|
||||||
@ -234,7 +234,7 @@ INSERT INTO tr_sub(path) VALUES ('5-top-1-#1');
|
|||||||
COMMIT;
|
COMMIT;
|
||||||
|
|
||||||
|
|
||||||
SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1');
|
SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1', 'include-sequences', '0');
|
||||||
|
|
||||||
-- check that DDL in aborted subtransactions handled correctly
|
-- check that DDL in aborted subtransactions handled correctly
|
||||||
CREATE TABLE tr_sub_ddl(data int);
|
CREATE TABLE tr_sub_ddl(data int);
|
||||||
@ -247,7 +247,7 @@ ALTER TABLE tr_sub_ddl ALTER COLUMN data TYPE bigint;
|
|||||||
INSERT INTO tr_sub_ddl VALUES(43);
|
INSERT INTO tr_sub_ddl VALUES(43);
|
||||||
COMMIT;
|
COMMIT;
|
||||||
|
|
||||||
SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1');
|
SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1', 'include-sequences', '0');
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -410,10 +410,10 @@ WHERE id = 1;
|
|||||||
-- make sure we decode correctly even if the toast table is gone
|
-- make sure we decode correctly even if the toast table is gone
|
||||||
DROP TABLE toasttable;
|
DROP TABLE toasttable;
|
||||||
|
|
||||||
SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1');
|
SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1', 'include-sequences', '0');
|
||||||
|
|
||||||
-- done, free logical replication slot
|
-- done, free logical replication slot
|
||||||
SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1');
|
SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1', 'include-sequences', '0');
|
||||||
|
|
||||||
SELECT pg_drop_replication_slot('regression_slot');
|
SELECT pg_drop_replication_slot('regression_slot');
|
||||||
|
|
||||||
|
@ -36,6 +36,6 @@ SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'inc
|
|||||||
COMMIT;
|
COMMIT;
|
||||||
|
|
||||||
INSERT INTO nobarf(data) VALUES('3');
|
INSERT INTO nobarf(data) VALUES('3');
|
||||||
SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1');
|
SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1', 'include-sequences', '0');
|
||||||
|
|
||||||
SELECT 'stop' FROM pg_drop_replication_slot('regression_slot');
|
SELECT 'stop' FROM pg_drop_replication_slot('regression_slot');
|
||||||
|
@ -60,7 +60,7 @@ BEGIN;
|
|||||||
-- setup transaction origin
|
-- setup transaction origin
|
||||||
SELECT pg_replication_origin_xact_setup('0/aabbccdd', '2013-01-01 00:00');
|
SELECT pg_replication_origin_xact_setup('0/aabbccdd', '2013-01-01 00:00');
|
||||||
INSERT INTO target_tbl(data)
|
INSERT INTO target_tbl(data)
|
||||||
SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1', 'only-local', '1');
|
SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1', 'only-local', '1', 'include-sequences', '0');
|
||||||
COMMIT;
|
COMMIT;
|
||||||
|
|
||||||
-- check replication progress for the session is correct
|
-- check replication progress for the session is correct
|
||||||
@ -79,11 +79,11 @@ SELECT pg_replication_origin_progress('regress_test_decoding: regression_slot',
|
|||||||
SELECT pg_replication_origin_session_reset();
|
SELECT pg_replication_origin_session_reset();
|
||||||
|
|
||||||
-- and magically the replayed xact will be filtered!
|
-- and magically the replayed xact will be filtered!
|
||||||
SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1', 'only-local', '1');
|
SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1', 'only-local', '1', 'include-sequences', '0');
|
||||||
|
|
||||||
--but new original changes still show up
|
--but new original changes still show up
|
||||||
INSERT INTO origin_tbl(data) VALUES ('will be replicated');
|
INSERT INTO origin_tbl(data) VALUES ('will be replicated');
|
||||||
SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1', 'only-local', '1');
|
SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1', 'only-local', '1', 'include-sequences', '0');
|
||||||
|
|
||||||
SELECT pg_drop_replication_slot('regression_slot');
|
SELECT pg_drop_replication_slot('regression_slot');
|
||||||
SELECT pg_replication_origin_drop('regress_test_decoding: regression_slot');
|
SELECT pg_replication_origin_drop('regress_test_decoding: regression_slot');
|
||||||
@ -114,7 +114,7 @@ SELECT local_id, external_id,
|
|||||||
remote_lsn <> '0/0' AS valid_remote_lsn,
|
remote_lsn <> '0/0' AS valid_remote_lsn,
|
||||||
local_lsn <> '0/0' AS valid_local_lsn
|
local_lsn <> '0/0' AS valid_local_lsn
|
||||||
FROM pg_replication_origin_status;
|
FROM pg_replication_origin_status;
|
||||||
SELECT data FROM pg_logical_slot_get_changes('regression_slot_no_lsn', NULL, NULL, 'skip-empty-xacts', '1', 'include-xids', '0');
|
SELECT data FROM pg_logical_slot_get_changes('regression_slot_no_lsn', NULL, NULL, 'skip-empty-xacts', '1', 'include-xids', '0', 'include-sequences', '0');
|
||||||
-- Clean up
|
-- Clean up
|
||||||
SELECT pg_replication_origin_session_reset();
|
SELECT pg_replication_origin_session_reset();
|
||||||
SELECT pg_drop_replication_slot('regression_slot_no_lsn');
|
SELECT pg_drop_replication_slot('regression_slot_no_lsn');
|
||||||
|
@ -90,7 +90,7 @@ COMMIT;
|
|||||||
-- make old files go away
|
-- make old files go away
|
||||||
CHECKPOINT;
|
CHECKPOINT;
|
||||||
|
|
||||||
SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1');
|
SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1', 'include-sequences', '0');
|
||||||
|
|
||||||
-- trigger repeated rewrites of a system catalog with a toast table,
|
-- trigger repeated rewrites of a system catalog with a toast table,
|
||||||
-- that previously was buggy: 20180914021046.oi7dm4ra3ot2g2kt@alap3.anarazel.de
|
-- that previously was buggy: 20180914021046.oi7dm4ra3ot2g2kt@alap3.anarazel.de
|
||||||
|
@ -51,7 +51,7 @@ SELECT 'init' FROM pg_create_logical_replication_slot('regression_slot2', 'test_
|
|||||||
INSERT INTO replication_example(somedata, text) VALUES (1, 3);
|
INSERT INTO replication_example(somedata, text) VALUES (1, 3);
|
||||||
|
|
||||||
SELECT data FROM pg_logical_slot_get_changes('regression_slot1', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1', 'include-sequences', '0');
|
SELECT data FROM pg_logical_slot_get_changes('regression_slot1', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1', 'include-sequences', '0');
|
||||||
SELECT data FROM pg_logical_slot_get_changes('regression_slot2', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1');
|
SELECT data FROM pg_logical_slot_get_changes('regression_slot2', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1', 'include-sequences', '0');
|
||||||
|
|
||||||
INSERT INTO replication_example(somedata, text) VALUES (1, 4);
|
INSERT INTO replication_example(somedata, text) VALUES (1, 4);
|
||||||
INSERT INTO replication_example(somedata, text) VALUES (1, 5);
|
INSERT INTO replication_example(somedata, text) VALUES (1, 5);
|
||||||
@ -65,8 +65,8 @@ SELECT slot_name FROM pg_replication_slot_advance('regression_slot2', pg_current
|
|||||||
|
|
||||||
SELECT :'wal_lsn' = :'end_lsn';
|
SELECT :'wal_lsn' = :'end_lsn';
|
||||||
|
|
||||||
SELECT data FROM pg_logical_slot_get_changes('regression_slot1', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1');
|
SELECT data FROM pg_logical_slot_get_changes('regression_slot1', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1', 'include-sequences', '0');
|
||||||
SELECT data FROM pg_logical_slot_get_changes('regression_slot2', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1');
|
SELECT data FROM pg_logical_slot_get_changes('regression_slot2', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1', 'include-sequences', '0');
|
||||||
|
|
||||||
DROP TABLE replication_example;
|
DROP TABLE replication_example;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user