> 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