Re: Internal error codes triggered by tests - Mailing list pgsql-hackers

From Daniel Gustafsson
Subject Re: Internal error codes triggered by tests
Date
Msg-id 021FC355-7A26-4A55-B9D2-01EF04A4EB18@yesql.se
Whole thread Raw
In response to Re: Internal error codes triggered by tests  (Michael Paquier <michael@paquier.xyz>)
Responses Re: Internal error codes triggered by tests
Re: Internal error codes triggered by tests
List pgsql-hackers
> On 10 Jul 2024, at 06:42, Michael Paquier <michael@paquier.xyz> wrote:

>> SELECT format('BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;
>> SET TRANSACTION SNAPSHOT ''%s''', repeat('-', 1000))
>> \gexec
>> ERROR:  XX000: could not open file "pg_snapshots/-----...---" for reading: File name too long
>> LOCATION:  ImportSnapshot, snapmgr.c:1428
>
> This one is fun.  errcode_for_file_access() does not know about
> ENAMETOOLONG, as an effect of the errno returned by AllocateFile().
> Perhaps it should map to ERRCODE_NAME_TOO_LONG?

Mapping this case to ERRCODE_NAME_TOO_LONG seems like a legit improvement, even
though the error is likely to be quite rare in production.

The rest mentioned upthread seems either not worth the effort or are likely to
be bugs warranting proper investigation.

--
Daniel Gustafsson




pgsql-hackers by date:

Previous
From: Sami Imseih
Date:
Subject: Re: Restart pg_usleep when interrupted
Next
From: Daniel Gustafsson
Date:
Subject: Re: Cutting support for OpenSSL 1.0.1 and 1.0.2 in 17~?