pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #16240: The now() function is populating different date time than expected
2+ messages / 2 participants
[nested] [flat]

* BUG #16240: The now() function is populating different date time than expected
@ 2020-02-03 10:38 PG Bug reporting form <noreply@postgresql.org>
  2020-02-03 14:24 ` Re: BUG #16240: The now() function is populating different date time than expected Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 2+ messages in thread

From: PG Bug reporting form @ 2020-02-03 10:38 UTC (permalink / raw)
  To: pgsql-bugs@lists.postgresql.org; +Cc: borratejaabhi@gmail.com

The following bug has been logged on the website:

Bug reference:      16240
Logged by:          Abhishek Borra
Email address:      borratejaabhi@gmail.com
PostgreSQL version: 9.6.9
Operating system:   Linux
Description:        

We have certain columns in our database of data type 'timestamp with time
zone'. We are populating them with now() function as default value
.Sometimes the date time is getting populated as dates from 2017/18
randomly. What can be the possible cause of this issue?



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: BUG #16240: The now() function is populating different date time than expected
  2020-02-03 10:38 BUG #16240: The now() function is populating different date time than expected PG Bug reporting form <noreply@postgresql.org>
@ 2020-02-03 14:24 ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2020-02-03 14:24 UTC (permalink / raw)
  To: borratejaabhi@gmail.com; +Cc: pgsql-bugs@lists.postgresql.org

PG Bug reporting form <noreply@postgresql.org> writes:
> We have certain columns in our database of data type 'timestamp with time
> zone'. We are populating them with now() function as default value
> .Sometimes the date time is getting populated as dates from 2017/18
> randomly. What can be the possible cause of this issue?

The most likely bet is that something is issuing insert commands with
non-default values in that column.  now() itself does basically nothing
except read the transaction start timestamp.  If you were seeing lots
of *other* weird time effects, like say timestamps in the postmaster
log jumping all over the place, maybe it'd be possible to believe that
there's something wrong with your server's system clock.  But I'd
start by looking more closely at your application's SQL logic.

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2020-02-03 14:24 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-02-03 10:38 BUG #16240: The now() function is populating different date time than expected PG Bug reporting form <noreply@postgresql.org>
2020-02-03 14:24 ` Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox