pgsql: Handle ReadFile() EOF correctly on Windows.

Поиск
Список
Период
Сортировка
От Thomas Munro
Тема pgsql: Handle ReadFile() EOF correctly on Windows.
Дата
Msg-id E1iXIbM-000407-A8@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Handle ReadFile() EOF correctly on Windows.

When ReadFile() encounters the end of a file while reading from
a synchronous handle with an offset provided via OVERLAPPED, it
reports an error instead of returning 0.  By not handling that
(undocumented) result correctly, we caused some noisy LOG
messages about an unknown error code.  Repair.

Back-patch to 12, where we started using pread()/ReadFile() with
an offset.

Reported-by: ZhenHua Cai, Amit Kapila
Diagnosed-by: Juan Jose Santamaria Flecha
Tested-by: Amit Kapila
Discussion: https://postgr.es/m/CAA4eK1LK3%2BWRtpz68TiRdpHwxxWm%3D%2Bt1BMf-G68hhQsAQ41PZg%40mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/6969deeb8d3991cc533a5bcf451ae5eecaa9a517

Modified Files
--------------
src/port/pread.c | 3 +++
1 file changed, 3 insertions(+)


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

Предыдущее
От: Amit Kapila
Дата:
Сообщение: pgsql: Add the support for '-f' option in dropdb utility.
Следующее
От: Thomas Munro
Дата:
Сообщение: pgsql: Handle ReadFile() EOF correctly on Windows.