pgsql: Fix another incorrect data type choice from commit dc2123400.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix another incorrect data type choice from commit dc2123400.
Date: 2023-12-27 18:05:31
Message-ID: E1rIYHb-00CBpH-GK@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix another incorrect data type choice from commit dc2123400.

add_file_to_manifest declared its mtime argument as pg_time_t,
apparently on the principle that copy-and-paste from the backend
is fine. However, the callers are passing struct stat's st_mtime
field which is plain time_t, and add_file_to_manifest itself is
passing the value to gmtime(3) which expects plain time_t,
so the whole thing would not work at all on any platform where
those types are different. Fortunately we can just switch this
variable to time_t.

Per warnings from assorted buildfarm members.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/3f1fd416316cbb66de61ac1ac34839f025b0b242

Modified Files
--------------
src/bin/pg_combinebackup/write_manifest.c | 2 +-
src/bin/pg_combinebackup/write_manifest.h | 3 +--
2 files changed, 2 insertions(+), 3 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2023-12-27 18:53:25 pgsql: Doc: specify aclitem syntax more clearly.
Previous Message Peter Eisentraut 2023-12-27 16:49:21 pgsql: Fix incorrect format placeholders