Fix fseek() detection of unseekable files on WIN32

From: Juan José Santamaría Flecha <juanjo(dot)santamaria(at)gmail(dot)com>
To: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, Michael Paquier <michael(at)paquier(dot)xyz>
Subject: Fix fseek() detection of unseekable files on WIN32
Date: 2023-03-14 12:26:27
Message-ID: CAC+AXB26a4EmxM2suXxPpJaGrqAdxracd7hskLg-zxtPB50h7A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello all,

As highlighted in [1] fseek() might fail to error even when accessing
unseekable streams.

PFA a patch that checks the file type before the actual fseek(), so only
supported calls are made.

[1]
https://www.postgresql.org/message-id/flat/b1448cd7-871e-20e3-8398-895e2d1d3bf9(at)gmail(dot)com

Regards,

Juan José Santamaría Flecha

Attachment Content-Type Size
0001-fix-fseek-detection-of-unseekable-files-for-WIN32.patch application/octet-stream 2.6 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Juan José Santamaría Flecha 2023-03-14 12:47:09 Re: pg_dump/pg_restore: Fix stdin/stdout handling of custom format on Win32
Previous Message Amit Kapila 2023-03-14 11:46:50 Re: Add macros for ReorderBufferTXN toptxn