@@ -19,7 +19,7 @@ SELECT pg_drop_replication_slot('regression_slot');
19
19
20
20
-- check that we're detecting a streaming rep slot used for logical decoding
21
21
SELECT ' 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 ' );
23
23
SELECT pg_drop_replication_slot(' repl' );
24
24
25
25
@@ -68,7 +68,7 @@ SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'inc
68
68
69
69
ALTER TABLE replication_example ALTER COLUMN somenum TYPE int4 USING (somenum::int4);
70
70
-- 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 ' );
72
72
73
73
INSERT INTO replication_example(somedata, somenum) VALUES (5 , 1 );
74
74
@@ -82,7 +82,7 @@ INSERT INTO replication_example(somedata, somenum, zaphod1) VALUES (6, 4, 2);
82
82
COMMIT ;
83
83
84
84
-- 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 ' );
86
86
87
87
-- ON CONFLICT DO UPDATE support
88
88
BEGIN ;
@@ -91,7 +91,7 @@ INSERT INTO replication_example(id, somedata, somenum) SELECT i, i, i FROM gener
91
91
COMMIT ;
92
92
93
93
/* 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 ' );
95
95
96
96
CREATE TABLE tr_unique (id2 serial unique NOT NULL , data int );
97
97
INSERT INTO tr_unique(data) VALUES (10 );
@@ -104,7 +104,7 @@ INSERT INTO tr_pkey(data) VALUES(1);
104
104
DELETE FROM tr_pkey;
105
105
106
106
/* 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 ' );
108
108
109
109
/*
110
110
* check that disk spooling works (also for logical messages)
@@ -136,7 +136,7 @@ DROP TABLE spoolme;
136
136
COMMIT ;
137
137
138
138
SELECT 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 ' )
140
140
WHERE data ~ ' UPDATE' ;
141
141
142
142
-- check that a large, spooled, upsert works
@@ -145,7 +145,7 @@ SELECT g.i, -g.i FROM generate_series(8000, 12000) g(i)
145
145
ON CONFLICT(id) DO UPDATE SET data = EXCLUDED .data ;
146
146
147
147
SELECT 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
149
149
GROUP BY 1
150
150
ORDER BY min (ordinality);
151
151
@@ -202,7 +202,7 @@ RELEASE SAVEPOINT subtop;
202
202
INSERT INTO tr_sub(path ) VALUES (' 2-top-#1' );
203
203
COMMIT ;
204
204
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 ' );
206
206
207
207
-- make sure rollbacked subtransactions aren't decoded
208
208
BEGIN ;
@@ -215,7 +215,7 @@ ROLLBACK TO SAVEPOINT b;
215
215
INSERT INTO tr_sub(path ) VALUES (' 3-top-2-#2' );
216
216
COMMIT ;
217
217
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 ' );
219
219
220
220
-- test whether a known, but not yet logged toplevel xact, followed by a
221
221
-- subxact commit is handled correctly
@@ -234,7 +234,7 @@ INSERT INTO tr_sub(path) VALUES ('5-top-1-#1');
234
234
COMMIT ;
235
235
236
236
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 ' );
238
238
239
239
-- check that DDL in aborted subtransactions handled correctly
240
240
CREATE TABLE tr_sub_ddl (data int );
@@ -247,7 +247,7 @@ ALTER TABLE tr_sub_ddl ALTER COLUMN data TYPE bigint;
247
247
INSERT INTO tr_sub_ddl VALUES (43 );
248
248
COMMIT ;
249
249
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 ' );
251
251
252
252
253
253
/*
@@ -410,10 +410,10 @@ WHERE id = 1;
410
410
-- make sure we decode correctly even if the toast table is gone
411
411
DROP TABLE toasttable;
412
412
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 ' );
414
414
415
415
-- 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 ' );
417
417
418
418
SELECT pg_drop_replication_slot(' regression_slot' );
419
419
0 commit comments