Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit d6677b9

Browse files
committed
Make test_decoding ddl.out shorter
Some of the test_decoding test output was extremely wide, because it deals with massive toasted values, and the aligned mode causes psql to produce 200kB of whitespace and dashes. Change to unaligned mode temporarily to avoid that behavior. Backpatch to 14, where it applies cleanly. Discussion: https://postgr.es/m/20230405103953.sxleixp3uz5lazst@alvherre.pgsql
1 parent 6061ade commit d6677b9

File tree

2 files changed

+164
-158
lines changed

2 files changed

+164
-158
lines changed

contrib/test_decoding/expected/ddl.out

Lines changed: 158 additions & 158 deletions
Large diffs are not rendered by default.

contrib/test_decoding/sql/ddl.sql

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,11 @@ UPDATE toasttable
414414
SET toasted_col1 = (SELECT string_agg(g.i::text, '') FROM generate_series(1, 2000) g(i))
415415
WHERE id = 1;
416416

417+
-- This output is extremely wide, and using aligned mode causes psql to
418+
-- produce 200kB of useless dashes. Turn that off temporarily to avoid it.
419+
\pset format unaligned
417420
SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1');
421+
\pset format aligned
418422

419423
INSERT INTO toasttable(toasted_col1) SELECT string_agg(g.i::text, '') FROM generate_series(1, 2000) g(i);
420424

@@ -426,10 +430,12 @@ WHERE id = 1;
426430
-- make sure we decode correctly even if the toast table is gone
427431
DROP TABLE toasttable;
428432

433+
\pset format unaligned
429434
SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1');
430435

431436
-- done, free logical replication slot
432437
SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1');
438+
\pset format aligned
433439

434440
SELECT pg_drop_replication_slot('regression_slot');
435441

0 commit comments

Comments
 (0)