]> granicus.if.org Git - postgresql/commitdiff
Add regression test for wide REPLICA IDENTITY FULL updates.
authorAndres Freund <andres@anarazel.de>
Sat, 5 Aug 2017 21:41:40 +0000 (14:41 -0700)
committerAndres Freund <andres@anarazel.de>
Sat, 5 Aug 2017 21:44:13 +0000 (14:44 -0700)
This just contains the regression tests added by a fix for a 9.4
specific bug regarding $subject.

Author: Andres Freund
Backpatch: 9.5-

contrib/test_decoding/expected/toast.out
contrib/test_decoding/sql/toast.sql

index 389748ff8c106a2bfd8468a2a834389fe414ec5d..91a9a1e86d6c630d3b4dd12efe4f75eef090a492 100644 (file)
@@ -305,7 +305,13 @@ ALTER TABLE toasted_several REPLICA IDENTITY FULL;
 ALTER TABLE toasted_several ALTER COLUMN toasted_key SET STORAGE EXTERNAL;
 ALTER TABLE toasted_several ALTER COLUMN toasted_col1 SET STORAGE EXTERNAL;
 ALTER TABLE toasted_several ALTER COLUMN toasted_col2 SET STORAGE EXTERNAL;
-INSERT INTO toasted_several(toasted_key) VALUES(repeat('9876543210', 2000));
+INSERT INTO toasted_several(toasted_key) VALUES(repeat('9876543210', 10000));
+SELECT pg_column_size(toasted_key) > 2^16 FROM toasted_several;
+ ?column? 
+----------
+ t
+(1 row)
+
 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');
                                                                                                regexp_replace                                                                                               
 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
index dcb74e38c77dbf7c55e6e9c0abc73b7c5c37385e..ef11d2bfff999a3ed195c2dca7ae2192634cc752 100644 (file)
@@ -279,7 +279,8 @@ ALTER TABLE toasted_several ALTER COLUMN toasted_key SET STORAGE EXTERNAL;
 ALTER TABLE toasted_several ALTER COLUMN toasted_col1 SET STORAGE EXTERNAL;
 ALTER TABLE toasted_several ALTER COLUMN toasted_col2 SET STORAGE EXTERNAL;
 
-INSERT INTO toasted_several(toasted_key) VALUES(repeat('9876543210', 2000));
+INSERT INTO toasted_several(toasted_key) VALUES(repeat('9876543210', 10000));
+SELECT pg_column_size(toasted_key) > 2^16 FROM toasted_several;
 
 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');