Re: pg11+: pg_ls_*dir LIMIT 1: temporary files .. not closed at end-of-transaction - Mailing list pgsql-hackers

From Alexander Lakhin
Subject Re: pg11+: pg_ls_*dir LIMIT 1: temporary files .. not closed at end-of-transaction
Date
Msg-id ccd33e2c-9816-6c04-1cf7-031218bbc035@gmail.com
Whole thread Raw
In response to Re: pg11+: pg_ls_*dir LIMIT 1: temporary files .. not closed at end-of-transaction  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: pg11+: pg_ls_*dir LIMIT 1: temporary files .. not closed at end-of-transaction  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
13.11.2020 23:16, Tom Lane wrote:
> Alexander Lakhin <exclusion@gmail.com> writes:
>> Shouldn't pg_ls_dir_files() retry stat() on ERROR_ACCESS_DENIED just
>> like the pgwin32_open() does to ignore files in "delete pending" state?
> That would soon lead us to changing every stat() caller in the system
> to have Windows-specific looping logic.  No thanks.  If we need to do
> this, let's put in a Windows wrapper layer comparable to pgwin32_open()
> for open().
Maybe pgwin32_safestat() should perform this... For now it checks
GetLastError() for ERROR_DELETE_PENDING, but as we've found out
previously this error code in fact is not returned by the OS.
And if the fix is not going to be quick, probably it should be discussed
in another thread...

Best regards,
Alexander



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: pg11+: pg_ls_*dir LIMIT 1: temporary files .. not closed at end-of-transaction
Next
From: Tom Lane
Date:
Subject: Re: pg11+: pg_ls_*dir LIMIT 1: temporary files .. not closed at end-of-transaction