Re: Fix fseek() detection of unseekable files on WIN32

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Fix fseek() detection of unseekable files on WIN32
Дата
Msg-id ZBbv+wfxsAXI4mqc@paquier.xyz
обсуждение исходный текст
Ответ на Re: Fix fseek() detection of unseekable files on WIN32  (Juan José Santamaría Flecha <juanjo.santamaria@gmail.com>)
Ответы Re: Fix fseek() detection of unseekable files on WIN32  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-hackers
On Thu, Mar 16, 2023 at 10:08:44AM +0100, Juan José Santamaría Flecha wrote:
> IDK, this is just looking for the good case, anything else we'll fail with
> ESPIPE or EINVAL anyway. If we want to get the proper file type we can call
> fstat(), which has the full logic.

I am not sure, TBH.  As presented, the two GetFileType() calls in
_pgftello64() and _pgfseeko64() ignore the case where it returns
FILE_TYPE_UNKNOWN and GetLastError() has something else than
NO_ERROR.  The code would return EINVAL for all the errors happening.
Perhaps that's fine, though I am wondering if we should report
something more exact, based on _dosmaperr(GetLastError())?
--
Michael

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Michail Nikolaev
Дата:
Сообщение: Replace known_assigned_xids_lck by memory barrier
Следующее
От: Jeevan Ladhe
Дата:
Сообщение: server log inflates due to pg_logical_slot_peek_changes/pg_logical_slot_get_changes calls