Re: Fix src/test/subscription/t/029_on_error.pl test when wal_debug is enabled - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Fix src/test/subscription/t/029_on_error.pl test when wal_debug is enabled
Date
Msg-id Zk_6Q1OJxKAELxLo@paquier.xyz
Whole thread Raw
In response to RE: Fix src/test/subscription/t/029_on_error.pl test when wal_debug is enabled  (Ilyasov Ian <ianilyasov@outlook.com>)
List 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

Attachment

pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: First draft of PG 17 release notes
Next
From: Tatsuo Ishii
Date:
Subject: Re: Row pattern recognition