Re: Improve error reporting in 027_stream_regress test
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Bilal Yavuz <byavuz81@gmail.com>
Cc: Brandon Tat <brandontat6@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>, Alexander Lakhin <exclusion@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, Andres Freund <andres@anarazel.de>
Date: 2025-12-05T04:36:56Z
Lists: pgsql-hackers
Attachments
- v6-0001-Add-read_head_tail-helper-to-Utils.pm.patch (text/x-diff) patch v6-0001
- v6-0002-Improve-error-reporting-in-027_stream_regress-tes.patch (text/x-diff) patch v6-0002
On Thu, Dec 04, 2025 at 03:33:30PM +0300, Bilal Yavuz wrote: > I applied these feedbacks in v5. I wanted to cover all possible cases > so I think 0002 might be a bit more complicated than it needs to be. > > What do you think about the current implementation? I'm finding that a bit bloated. My own attempt is the attached, which is much simpler, returning only array for the lines of @tail and @head. I am not sure to see the use-case in favor of enforcing the line count for the caller of the new routine based on what's on this thread, so I have left that out to simplify the patch. v5 had a mistake: slurp_file() on the full diffs should be removed once we dump only the tail and head. It is true that 027 would add an extra line if regression.diffs is too short when written this way, but the information reported is the same, while keeping the code simpler in 027. A portion of the comment at the top of the block printing the diffs could be removed: with the limitation of lines in place we don't bloat the output anymore. -- Michael
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Improve error reporting of recovery test 027_stream_regress
- 47da198934e9 19 (unreleased) landed
-
Add PostgreSQL::Test::Cluster::read_head_tail() helper to PostgreSQL/Utils.pm
- b93f4e2f98b3 19 (unreleased) landed
-
Handle timeout in PostgreSQL::Test::Cluster::is_alive()
- cb833c1b6d19 19 (unreleased) landed
-
Check status of nodes after regression test run in 027_stream_regress
- 1e9b5140c44b 19 (unreleased) landed
-
Add PostgreSQL::Test::Cluster::is_alive()
- d4c9195eff41 19 (unreleased) landed