From d6677b93c79b19bf3772cb32fcea0a77d8520db9 Mon Sep 17 00:00:00 2001 From: Alvaro Herrera Date: Mon, 24 Jul 2023 17:48:06 +0200 Subject: 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 --- contrib/test_decoding/sql/ddl.sql | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'contrib/test_decoding/sql') diff --git a/contrib/test_decoding/sql/ddl.sql b/contrib/test_decoding/sql/ddl.sql index 57285a828c7..2f8e4e7f2cc 100644 --- a/contrib/test_decoding/sql/ddl.sql +++ b/contrib/test_decoding/sql/ddl.sql @@ -414,7 +414,11 @@ UPDATE toasttable SET toasted_col1 = (SELECT string_agg(g.i::text, '') FROM generate_series(1, 2000) g(i)) WHERE id = 1; +-- This output is extremely wide, and using aligned mode causes psql to +-- produce 200kB of useless dashes. Turn that off temporarily to avoid it. +\pset format unaligned SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1'); +\pset format aligned INSERT INTO toasttable(toasted_col1) SELECT string_agg(g.i::text, '') FROM generate_series(1, 2000) g(i); @@ -426,10 +430,12 @@ WHERE id = 1; -- make sure we decode correctly even if the toast table is gone DROP TABLE toasttable; +\pset format unaligned SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1'); -- done, free logical replication slot SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1'); +\pset format aligned SELECT pg_drop_replication_slot('regression_slot'); -- cgit v1.2.3