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

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Ilyasov Ian <ianilyasov(at)outlook(dot)com>
Cc: "amit(dot)kapila16(at)gmail(dot)com" <amit(dot)kapila16(at)gmail(dot)com>, "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>, "a(dot)voloshin(at)postgrespro(dot)ru" <a(dot)voloshin(at)postgrespro(dot)ru>, 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-24 02:24:03
Message-ID: Zk_6Q1OJxKAELxLo@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, May 23, 2024 at 08:12:07AM +0000, Ilyasov Ian wrote:
> > It seems to me that we should keep the 'for replication target relation
> "public.tbl" in transaction \d+,', before the "finished at" so as it
> is possible to make a difference with the context that has a column
> name and the context where there is no target relation.
>
> I agree. Attached the updated patch.

One issue that you have here is that the regexp detection would still
fail when setting log_error_verbosity = verbose because of the extra
error code added between the ERROR and the string. This caused the
LSN to not be fetched properly.

At the end, I've come up with a regexp that checks for a match of the
error string after the ERROR to not confuse the last part getting the
xdigits, and applied that down to 15. Perhaps I would have added the
first "ERROR" part in the check, but could not come down to it for the
readability of the thing.
--
Michael

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tatsuo Ishii 2024-05-24 02:39:19 Re: Row pattern recognition
Previous Message Peter Geoghegan 2024-05-24 00:19:15 Re: First draft of PG 17 release notes