@@ -19,7 +19,7 @@ SELECT pg_drop_replication_slot('regression_slot');
1919
2020-- check that we're detecting a streaming rep slot used for logical decoding
2121SELECT ' init' FROM pg_create_physical_replication_slot(' repl' );
22- SELECT data FROM pg_logical_slot_get_changes(' repl' , NULL , NULL , ' include-xids' , ' 0' , ' skip-empty-xacts' , ' 1' );
22+ SELECT data FROM pg_logical_slot_get_changes(' repl' , NULL , NULL , ' include-xids' , ' 0' , ' skip-empty-xacts' , ' 1' , ' include-sequences ' , ' 0 ' );
2323SELECT pg_drop_replication_slot(' repl' );
2424
2525
@@ -68,7 +68,7 @@ SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'inc
6868
6969ALTER TABLE replication_example ALTER COLUMN somenum TYPE int4 USING (somenum::int4);
7070-- check that this doesn't produce any changes from the heap rewrite
71- SELECT count (data) FROM pg_logical_slot_get_changes(' regression_slot' , NULL , NULL , ' include-xids' , ' 0' , ' skip-empty-xacts' , ' 1' );
71+ SELECT count (data) FROM pg_logical_slot_get_changes(' regression_slot' , NULL , NULL , ' include-xids' , ' 0' , ' skip-empty-xacts' , ' 1' , ' include-sequences ' , ' 0 ' );
7272
7373INSERT INTO replication_example(somedata, somenum) VALUES (5 , 1 );
7474
@@ -82,7 +82,7 @@ INSERT INTO replication_example(somedata, somenum, zaphod1) VALUES (6, 4, 2);
8282COMMIT ;
8383
8484-- show changes
85- SELECT data FROM pg_logical_slot_get_changes(' regression_slot' , NULL , NULL , ' include-xids' , ' 0' , ' skip-empty-xacts' , ' 1' );
85+ SELECT data FROM pg_logical_slot_get_changes(' regression_slot' , NULL , NULL , ' include-xids' , ' 0' , ' skip-empty-xacts' , ' 1' , ' include-sequences ' , ' 0 ' );
8686
8787-- ON CONFLICT DO UPDATE support
8888BEGIN ;
@@ -91,7 +91,7 @@ INSERT INTO replication_example(id, somedata, somenum) SELECT i, i, i FROM gener
9191COMMIT ;
9292
9393/* display results */
94- SELECT data FROM pg_logical_slot_get_changes(' regression_slot' , NULL , NULL , ' include-xids' , ' 0' , ' skip-empty-xacts' , ' 1' );
94+ SELECT data FROM pg_logical_slot_get_changes(' regression_slot' , NULL , NULL , ' include-xids' , ' 0' , ' skip-empty-xacts' , ' 1' , ' include-sequences ' , ' 0 ' );
9595
9696CREATE TABLE tr_unique (id2 serial unique NOT NULL , data int );
9797INSERT INTO tr_unique(data) VALUES (10 );
@@ -104,7 +104,7 @@ INSERT INTO tr_pkey(data) VALUES(1);
104104DELETE FROM tr_pkey;
105105
106106/* display results */
107- SELECT data FROM pg_logical_slot_get_changes(' regression_slot' , NULL , NULL , ' include-xids' , ' 0' , ' skip-empty-xacts' , ' 1' );
107+ SELECT data FROM pg_logical_slot_get_changes(' regression_slot' , NULL , NULL , ' include-xids' , ' 0' , ' skip-empty-xacts' , ' 1' , ' include-sequences ' , ' 0 ' );
108108
109109/*
110110 * check that disk spooling works (also for logical messages)
@@ -136,7 +136,7 @@ DROP TABLE spoolme;
136136COMMIT ;
137137
138138SELECT data
139- FROM pg_logical_slot_get_changes(' regression_slot' , NULL , NULL , ' include-xids' , ' 0' , ' skip-empty-xacts' , ' 1' )
139+ FROM pg_logical_slot_get_changes(' regression_slot' , NULL , NULL , ' include-xids' , ' 0' , ' skip-empty-xacts' , ' 1' , ' include-sequences ' , ' 0 ' )
140140WHERE data ~ ' UPDATE' ;
141141
142142-- check that a large, spooled, upsert works
@@ -145,7 +145,7 @@ SELECT g.i, -g.i FROM generate_series(8000, 12000) g(i)
145145ON CONFLICT(id) DO UPDATE SET data = EXCLUDED .data ;
146146
147147SELECT substring (data, 1 , 29 ), count (* )
148- FROM pg_logical_slot_get_changes(' regression_slot' , NULL , NULL , ' include-xids' , ' 0' , ' skip-empty-xacts' , ' 1' ) WITH ORDINALITY
148+ FROM pg_logical_slot_get_changes(' regression_slot' , NULL , NULL , ' include-xids' , ' 0' , ' skip-empty-xacts' , ' 1' , ' include-sequences ' , ' 0 ' ) WITH ORDINALITY
149149GROUP BY 1
150150ORDER BY min (ordinality);
151151
@@ -202,7 +202,7 @@ RELEASE SAVEPOINT subtop;
202202INSERT INTO tr_sub(path ) VALUES (' 2-top-#1' );
203203COMMIT ;
204204
205- SELECT data FROM pg_logical_slot_get_changes(' regression_slot' , NULL , NULL , ' include-xids' , ' 0' , ' skip-empty-xacts' , ' 1' );
205+ SELECT data FROM pg_logical_slot_get_changes(' regression_slot' , NULL , NULL , ' include-xids' , ' 0' , ' skip-empty-xacts' , ' 1' , ' include-sequences ' , ' 0 ' );
206206
207207-- make sure rollbacked subtransactions aren't decoded
208208BEGIN ;
@@ -215,7 +215,7 @@ ROLLBACK TO SAVEPOINT b;
215215INSERT INTO tr_sub(path ) VALUES (' 3-top-2-#2' );
216216COMMIT ;
217217
218- SELECT data FROM pg_logical_slot_get_changes(' regression_slot' , NULL , NULL , ' include-xids' , ' 0' , ' skip-empty-xacts' , ' 1' );
218+ SELECT data FROM pg_logical_slot_get_changes(' regression_slot' , NULL , NULL , ' include-xids' , ' 0' , ' skip-empty-xacts' , ' 1' , ' include-sequences ' , ' 0 ' );
219219
220220-- test whether a known, but not yet logged toplevel xact, followed by a
221221-- subxact commit is handled correctly
@@ -234,7 +234,7 @@ INSERT INTO tr_sub(path) VALUES ('5-top-1-#1');
234234COMMIT ;
235235
236236
237- SELECT data FROM pg_logical_slot_get_changes(' regression_slot' , NULL , NULL , ' include-xids' , ' 0' , ' skip-empty-xacts' , ' 1' );
237+ SELECT data FROM pg_logical_slot_get_changes(' regression_slot' , NULL , NULL , ' include-xids' , ' 0' , ' skip-empty-xacts' , ' 1' , ' include-sequences ' , ' 0 ' );
238238
239239-- check that DDL in aborted subtransactions handled correctly
240240CREATE TABLE tr_sub_ddl (data int );
@@ -247,7 +247,7 @@ ALTER TABLE tr_sub_ddl ALTER COLUMN data TYPE bigint;
247247INSERT INTO tr_sub_ddl VALUES (43 );
248248COMMIT ;
249249
250- SELECT data FROM pg_logical_slot_get_changes(' regression_slot' , NULL , NULL , ' include-xids' , ' 0' , ' skip-empty-xacts' , ' 1' );
250+ SELECT data FROM pg_logical_slot_get_changes(' regression_slot' , NULL , NULL , ' include-xids' , ' 0' , ' skip-empty-xacts' , ' 1' , ' include-sequences ' , ' 0 ' );
251251
252252
253253/*
@@ -410,10 +410,10 @@ WHERE id = 1;
410410-- make sure we decode correctly even if the toast table is gone
411411DROP TABLE toasttable;
412412
413- SELECT data FROM pg_logical_slot_get_changes(' regression_slot' , NULL , NULL , ' include-xids' , ' 0' , ' skip-empty-xacts' , ' 1' );
413+ SELECT data FROM pg_logical_slot_get_changes(' regression_slot' , NULL , NULL , ' include-xids' , ' 0' , ' skip-empty-xacts' , ' 1' , ' include-sequences ' , ' 0 ' );
414414
415415-- done, free logical replication slot
416- SELECT data FROM pg_logical_slot_get_changes(' regression_slot' , NULL , NULL , ' include-xids' , ' 0' , ' skip-empty-xacts' , ' 1' );
416+ SELECT data FROM pg_logical_slot_get_changes(' regression_slot' , NULL , NULL , ' include-xids' , ' 0' , ' skip-empty-xacts' , ' 1' , ' include-sequences ' , ' 0 ' );
417417
418418SELECT pg_drop_replication_slot(' regression_slot' );
419419
0 commit comments