Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0d1f98b

Browse files
committed
Add regression test for wide REPLICA IDENTITY FULL updates.
This just contains the regression tests added by a fix for a 9.4 specific bug regarding $subject. Author: Andres Freund Backpatch: 9.5-
1 parent dd2358a commit 0d1f98b

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

contrib/test_decoding/expected/toast.out

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,13 @@ ALTER TABLE toasted_several REPLICA IDENTITY FULL;
305305
ALTER TABLE toasted_several ALTER COLUMN toasted_key SET STORAGE EXTERNAL;
306306
ALTER TABLE toasted_several ALTER COLUMN toasted_col1 SET STORAGE EXTERNAL;
307307
ALTER TABLE toasted_several ALTER COLUMN toasted_col2 SET STORAGE EXTERNAL;
308-
INSERT INTO toasted_several(toasted_key) VALUES(repeat('9876543210', 2000));
308+
INSERT INTO toasted_several(toasted_key) VALUES(repeat('9876543210', 10000));
309+
SELECT pg_column_size(toasted_key) > 2^16 FROM toasted_several;
310+
?column?
311+
----------
312+
t
313+
(1 row)
314+
309315
SELECT regexp_replace(data, '^(.{100}).*(.{100})$', '\1..\2') FROM pg_logical_slot_peek_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1');
310316
regexp_replace
311317
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

contrib/test_decoding/sql/toast.sql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,8 @@ ALTER TABLE toasted_several ALTER COLUMN toasted_key SET STORAGE EXTERNAL;
279279
ALTER TABLE toasted_several ALTER COLUMN toasted_col1 SET STORAGE EXTERNAL;
280280
ALTER TABLE toasted_several ALTER COLUMN toasted_col2 SET STORAGE EXTERNAL;
281281

282-
INSERT INTO toasted_several(toasted_key) VALUES(repeat('9876543210', 2000));
282+
INSERT INTO toasted_several(toasted_key) VALUES(repeat('9876543210', 10000));
283+
SELECT pg_column_size(toasted_key) > 2^16 FROM toasted_several;
283284

284285
SELECT regexp_replace(data, '^(.{100}).*(.{100})$', '\1..\2') FROM pg_logical_slot_peek_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1');
285286

0 commit comments

Comments
 (0)