pgsql: Replace time_t with pg_time_t (same values, but always int64) in

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Replace time_t with pg_time_t (same values, but always int64) in
Date: 2008-02-17 02:09:33
Message-ID: 20080217020933.378F0754108@cvs.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Log Message:
-----------
Replace time_t with pg_time_t (same values, but always int64) in on-disk
data structures and backend internal APIs. This solves problems we've seen
recently with inconsistent layout of pg_control between machines that have
32-bit time_t and those that have already migrated to 64-bit time_t. Also,
we can get out from under the problem that Windows' Unix-API emulation is not
consistent about the width of time_t.

There are a few remaining places where local time_t variables are used to hold
the current or recent result of time(NULL). I didn't bother changing these
since they do not affect any cross-module APIs and surely all platforms will
have 64-bit time_t before overflow becomes an actual risk. time_t should
be avoided for anything visible to extension modules, however.

Modified Files:
--------------
pgsql/contrib/pgcrypto:
internal.c (r1.27 -> r1.28)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/contrib/pgcrypto/internal.c?r1=1.27&r2=1.28)
pgsql/src/backend/access/transam:
xlog.c (r1.292 -> r1.293)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/transam/xlog.c?r1=1.292&r2=1.293)
pgsql/src/backend/postmaster:
bgwriter.c (r1.48 -> r1.49)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/postmaster/bgwriter.c?r1=1.48&r2=1.49)
syslogger.c (r1.44 -> r1.45)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/postmaster/syslogger.c?r1=1.44&r2=1.45)
pgsql/src/backend/utils/adt:
date.c (r1.138 -> r1.139)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/date.c?r1=1.138&r2=1.139)
datetime.c (r1.184 -> r1.185)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/datetime.c?r1=1.184&r2=1.185)
nabstime.c (r1.152 -> r1.153)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/nabstime.c?r1=1.152&r2=1.153)
timestamp.c (r1.184 -> r1.185)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/timestamp.c?r1=1.184&r2=1.185)
pgsql/src/backend/utils/init:
globals.c (r1.104 -> r1.105)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/init/globals.c?r1=1.104&r2=1.105)
pgsql/src/bin/pg_controldata:
pg_controldata.c (r1.36 -> r1.37)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/bin/pg_controldata/pg_controldata.c?r1=1.36&r2=1.37)
pgsql/src/bin/pg_resetxlog:
pg_resetxlog.c (r1.63 -> r1.64)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/bin/pg_resetxlog/pg_resetxlog.c?r1=1.63&r2=1.64)
pgsql/src/include/access:
xlog_internal.h (r1.22 -> r1.23)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/access/xlog_internal.h?r1=1.22&r2=1.23)
pgsql/src/include/catalog:
pg_control.h (r1.39 -> r1.40)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/catalog/pg_control.h?r1=1.39&r2=1.40)
pgsql/src/include:
miscadmin.h (r1.199 -> r1.200)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/miscadmin.h?r1=1.199&r2=1.200)
pgsql/src/include/port:
win32.h (r1.83 -> r1.84)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/port/win32.h?r1=1.83&r2=1.84)
pgsql/src/include/utils:
timestamp.h (r1.74 -> r1.75)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/utils/timestamp.h?r1=1.74&r2=1.75)
pgsql/src/tools/msvc:
Project.pm (r1.16 -> r1.17)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/tools/msvc/Project.pm?r1=1.16&r2=1.17)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2008-02-17 04:21:05 pgsql: Add back #include <time.h> in a couple of files that seem to need
Previous Message Bruce Momjian 2008-02-16 23:27:34 pgsql: Move item as done: < > * -Allow AS in "SELECT col AS label" to