diff options
author | Andres Freund <andres@anarazel.de> | 2017-08-05 14:41:40 -0700 |
---|---|---|
committer | Andres Freund <andres@anarazel.de> | 2017-08-05 14:43:11 -0700 |
commit | 0d1f98b80e094827199da8a3dea51f04d134b7bf (patch) | |
tree | 9b5f5344a91c1e182b0d157c032468bd1a136c07 /contrib/test_decoding | |
parent | dd2358a704fc27c3f20b252e1354740086a7b6f3 (diff) | |
download | postgresql-0d1f98b80e094827199da8a3dea51f04d134b7bf.tar.gz postgresql-0d1f98b80e094827199da8a3dea51f04d134b7bf.zip |
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-
Diffstat (limited to 'contrib/test_decoding')
-rw-r--r-- | contrib/test_decoding/expected/toast.out | 8 | ||||
-rw-r--r-- | contrib/test_decoding/sql/toast.sql | 3 |
2 files changed, 9 insertions, 2 deletions
diff --git a/contrib/test_decoding/expected/toast.out b/contrib/test_decoding/expected/toast.out index 389748ff8c1..91a9a1e86d6 100644 --- a/contrib/test_decoding/expected/toast.out +++ b/contrib/test_decoding/expected/toast.out @@ -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 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ diff --git a/contrib/test_decoding/sql/toast.sql b/contrib/test_decoding/sql/toast.sql index dcb74e38c77..ef11d2bfff9 100644 --- a/contrib/test_decoding/sql/toast.sql +++ b/contrib/test_decoding/sql/toast.sql @@ -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'); |