Re: Internal error codes triggered by tests

From: Daniel Gustafsson <daniel(at)yesql(dot)se>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Alexander Lakhin <exclusion(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Internal error codes triggered by tests
Date: 2024-07-12 20:41:14
Message-ID: 021FC355-7A26-4A55-B9D2-01EF04A4EB18@yesql.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On 10 Jul 2024, at 06:42, Michael Paquier <michael(at)paquier(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Daniel Gustafsson 2024-07-12 20:42:25 Re: Cutting support for OpenSSL 1.0.1 and 1.0.2 in 17~?
Previous Message Sami Imseih 2024-07-12 20:39:57 Re: Restart pg_usleep when interrupted