pgsql: Provide 64-bit ftruncate() and lseek() on Windows.

From: Thomas Munro <tmunro(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Provide 64-bit ftruncate() and lseek() on Windows.
Date: 2025-01-09 03:03:54
Message-ID: E1tVipt-000aqU-Qx@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Provide 64-bit ftruncate() and lseek() on Windows.

Change our ftruncate() macro to use the 64-bit variant of chsize(), and
add a new macro to redirect lseek() to _lseeki64().

Back-patch to all supported releases, in preparation for a bug fix.

Tested-by: Davinder Singh <davinder(dot)singh(at)enterprisedb(dot)com>
Discussion: https://postgr.es/m/CAKZiRmyM4YnokK6Oenw5JKwAQ3rhP0YTz2T-tiw5dAQjGRXE3Q%40mail.gmail.com

Branch
------
REL_13_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/d02486cc8e0aac831c0d49f27f33ce8bd6968df2

Modified Files
--------------
src/include/port.h | 27 +++++++++++++++++++++++++++
src/include/port/win32_port.h | 2 --
src/pl/plperl/plperl_system.h | 1 +
3 files changed, 28 insertions(+), 2 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Thomas Munro 2025-01-09 03:06:19 pgsql: Fix off_t overflow in pg_basebackup on Windows.
Previous Message Thomas Munro 2025-01-09 03:03:39 pgsql: Provide 64-bit ftruncate() and lseek() on Windows.