From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add PostgreSQL::Test::Cluster::read_head_tail() helper to Postgr
Date: Sat, 06 Dec 2025 05:29:22 +0000
Message-ID: <E1vRkrB-0033Db-27@gemulon.postgresql.org> (raw)
Add PostgreSQL::Test::Cluster::read_head_tail() helper to PostgreSQL/Utils.pm
This function reads the lines from a file and filters its contents to
report its head and tail contents. The amount of contents to read from
a file can be tuned by the environment variable PG_TEST_FILE_READ_LINES,
that can be used to override the default of 50 lines. If the file whose
content is read has less lines than two times PG_TEST_FILE_READ_LINES,
the whole file is returned.
This will be used in a follow-up commit to limit the amount of
information reported by some of the TAP tests on failure, where we have
noticed that the contents reported by the buildfarm can be heavily
bloated in some cases, with the head and tail contents of a report being
able to provide enough information to be useful for debugging.
Author: Nazir Bilal Yavuz <byavuz81@gmail.com>
Co-authored-by: Michael Paquier <michael@paquier.xyz>
Discussion: https://postgr.es/m/CAN55FZ1D6KXvjSs7YGsDeadqCxNF3UUhjRAfforzzP0k-cE=bA@mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/b93f4e2f98b384596a307b6ce54ce2affadc518a
Modified Files
--------------
doc/src/sgml/regress.sgml | 8 ++++++
src/test/perl/PostgreSQL/Test/Utils.pm | 50 ++++++++++++++++++++++++++++++++++
2 files changed, 58 insertions(+)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: michael@paquier.xyz, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Add PostgreSQL::Test::Cluster::read_head_tail() helper to Postgr
In-Reply-To: <E1vRkrB-0033Db-27@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox