Re: Improve error reporting in 027_stream_regress test

Nazir Bilal Yavuz <byavuz81@gmail.com>

From: Nazir Bilal Yavuz <byavuz81@gmail.com>
To: Andres Freund <andres@anarazel.de>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-07-01T07:57:11Z
Lists: pgsql-hackers

Attachments

Hi,

On Mon, 30 Jun 2025 at 18:01, Andres Freund <andres@anarazel.de> wrote:
>
> Hi,
>
> On 2025-06-30 16:01:04 +0300, Nazir Bilal Yavuz wrote:
> > This patch aims to improve 027_stream_regress test's regression test
> > error reporting per Andres' suggestion [1].
>
> Thanks for working on that!
>
>
> One thing I don't yet like is that I think we should report if the primary is
> alive *before* reporting the diff and skipping reporting it if the primary
> crashed. It's not interesting to report a long diff if the server crashed IMO.

I agree with you. So, the current logic is:

If primary is not alive: Do not report anything.
If only primary is alive: Report the entire diff file.
If both primary and standby are alive: Report entire diff file and add
head+tail of diff to the failure message.

Done like above in v2.

-- 
Regards,
Nazir Bilal Yavuz
Microsoft

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Improve error reporting of recovery test 027_stream_regress

  2. Add PostgreSQL::Test::Cluster::read_head_tail() helper to PostgreSQL/Utils.pm

  3. Handle timeout in PostgreSQL::Test::Cluster::is_alive()

  4. Check status of nodes after regression test run in 027_stream_regress

  5. Add PostgreSQL::Test::Cluster::is_alive()