aboutsummaryrefslogtreecommitdiff
path: root/src/backend/postmaster/syslogger.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2008-02-17 02:09:32 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2008-02-17 02:09:32 +0000
commitcd004067742ee16ee63e55abfb4acbd5f09fbaab (patch)
tree62995d45f55faf5f5cdddc791d4d83d3de495b03 /src/backend/postmaster/syslogger.c
parentee7a6770f607e9e7f0e1b29dc25a7b7d63cb7940 (diff)
downloadpostgresql-cd004067742ee16ee63e55abfb4acbd5f09fbaab.tar.gz
postgresql-cd004067742ee16ee63e55abfb4acbd5f09fbaab.zip
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.
Diffstat (limited to 'src/backend/postmaster/syslogger.c')
-rw-r--r--src/backend/postmaster/syslogger.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/postmaster/syslogger.c b/src/backend/postmaster/syslogger.c
index aa5d34ef5b2..91bf56225a1 100644
--- a/src/backend/postmaster/syslogger.c
+++ b/src/backend/postmaster/syslogger.c
@@ -18,7 +18,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/postmaster/syslogger.c,v 1.44 2008/01/25 20:42:10 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/postmaster/syslogger.c,v 1.45 2008/02/17 02:09:27 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -331,7 +331,7 @@ SysLoggerMain(int argc, char *argv[])
if (!rotation_requested && Log_RotationAge > 0)
{
/* Do a logfile rotation if it's time */
- pg_time_t now = time(NULL);
+ pg_time_t now = (pg_time_t) time(NULL);
if (now >= next_rotation_time)
rotation_requested = time_based_rotation = true;