Re: Fix src/test/subscription/t/029_on_error.pl test when wal_debug is enabled

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Ilyasov Ian <ianilyasov(at)outlook(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Fix src/test/subscription/t/029_on_error.pl test when wal_debug is enabled
Date: 2024-05-20 11:09:13
Message-ID: CAA4eK1Lbimmi5MnLtm9vtz2UrFZGZ6JKBt7ATL_KeAuqVK=8yA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, May 17, 2024 at 5:25 AM Michael Paquier <michael(at)paquier(dot)xyz> wrote:
>
> On Thu, May 16, 2024 at 09:00:47AM +0530, Amit Kapila wrote:
> > This can only be a problem if the apply worker generates more LOG
> > entries with the required context but it won't do that unless there is
> > an operation on the publisher to replicate. If we see any such danger
> > then I agree this can break on some slow machines but as of now, I
> > don't see any such race condition.
>
> Perhaps, still I'm not completely sure if this assumption is going to
> always stand for all the possible configurations we support.
>

As per my understanding, this will primarily rely on the apply worker
design, not the other configurations, whether we see additional LOG.

> So,
> rather than coming back to this test again, I would choose to make the
> test as stable as possible from the start. That's what mapping with
> the error message would offer when grabbing the LSN from the CONTEXT
> part of it, because there's a one-one mapping between the expected
> ERROR and its CONTEXT from which the information used by the test is
> retrieved.
>

I was slightly hesitant to do an ERROR string-based check because the
error string can change and it doesn't seem to bring additional
stability for this particular test. But if you and others are still
not convinced with the simple fix suggested by me then feel free to
proceed with an error-string based check.

--
With Regards,
Amit Kapila.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thom Brown 2024-05-20 11:15:32 Re: PostgreSQL 17 Beta 1 release announcement draft
Previous Message Shlok Kyal 2024-05-20 10:59:50 Re: speed up a logical replica setup