Re: Buggy timestamp generation code in PG 7.4.5 on FreeBSD 4.10 - Mailing list pgsql-bugs

From Tom Lane
Subject Re: Buggy timestamp generation code in PG 7.4.5 on FreeBSD 4.10
Date
Msg-id 13001.1097438051@sss.pgh.pa.us
Whole thread Raw
In response to Buggy timestamp generation code in PG 7.4.5 on FreeBSD 4.10  (Justin Clift <jc@telstra.net>)
Responses Re: Buggy timestamp generation code in PG 7.4.5 on FreeBSD
List pgsql-bugs
Justin Clift <jc@telstra.net> writes:
> Running PG 7.4.5 on FreeBSD 4.10, we've found what looks to be buggy
> output from the timestamp code used to generate logfile entries.

The code involved is

    curtime = time(NULL);

    strftime(buf, sizeof(buf),
             "%Y-%m-%d %H:%M:%S ",
             localtime(&curtime));

so this bug report ought to go to the FreeBSD libc folk.

I believe there are known problems with BSD kernels sometimes returning
wrong clock readings on SMP machines, so that might be a place to look too.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: Installation Error
Next
From: Tom Lane
Date:
Subject: Re: postgres 8.0.0beta3 problem