From: | Thomas Munro <tmunro(at)postgresql(dot)org> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Use truncate(2) where appropriate. |
Date: | 2020-12-01 02:47:40 |
Message-ID: | E1kjvhc-0007DT-Cv@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Use truncate(2) where appropriate.
When truncating files by name, use truncate(2). Windows hasn't got it,
so keep our previous coding based on ftruncate(2) as a fallback.
Discussion: https://postgr.es/m/16663-fe97ccf9932fc800%40postgresql.org
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/57faaf376e1961fa48866c6e5d6926463c6671b1
Modified Files
--------------
src/backend/storage/file/fd.c | 27 +++++++++++++++++++++++++++
src/backend/storage/smgr/md.c | 13 +------------
src/include/storage/fd.h | 1 +
3 files changed, 29 insertions(+), 12 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2020-12-01 07:35:31 | pgsql: doc: Remove more notes about compatibilities with past versions |
Previous Message | Thomas Munro | 2020-12-01 02:23:28 | pgsql: Free disk space for dropped relations on commit. |