pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Changing the time on the server
3+ messages / 3 participants
[nested] [flat]

* Changing the time on the server
@ 2003-02-21 11:36 Donald Fraser <demolish@cwgsy.net>
  2003-02-21 15:35 ` Re: Changing the time on the server Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 3+ messages in thread

From: Donald Fraser @ 2003-02-21 11:36 UTC (permalink / raw)
  To: pgsql-admin

Could somebody tell me the consequences of setting the date forward in time on the server running PostgreSQL and then at a later date, after some transactions have been committed, setting the date back in time?

Thanks in advance,
Donald Fraser

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

* Re: Changing the time on the server
  2003-02-21 11:36 Changing the time on the server Donald Fraser <demolish@cwgsy.net>
@ 2003-02-21 15:35 ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 3+ messages in thread

From: Tom Lane @ 2003-02-21 15:35 UTC (permalink / raw)
  To: Donald Fraser <demolish@cwgsy.net>; +Cc: pgsql-admin

"Donald Fraser" <demolish@cwgsy.net> writes:
> Could somebody tell me the consequences of setting the date forward in time=
>  on the server running PostgreSQL and then at a later date, after some tran=
> sactions have been committed, setting the date back in time?

AFAIR, Postgres itself couldn't care less.  If your application stores
timestamps into the database, it might get a little confused about which
actions were done in what order ...

			regards, tom lane



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

* Re: Changing the time on the server
@ 2003-02-21 15:23 Nikolaus Dilger <nikolaus@dilger.cc>
  0 siblings, 0 replies; 3+ messages in thread

From: Nikolaus Dilger @ 2003-02-21 15:23 UTC (permalink / raw)
  To: demolish@cwgsy.net; +Cc: pgsql-admin

Donald,

It depends on your application and by how much you
change the time.

If you have a database field that is populated with the
system time when you insert records your application
logic may not work as intended.

Not sure why you would want to play with the system
clock in the first place.  If you use NTP (Network Time
Protocol) your server will always have the exact time. 
If your time is off you usually only have to change it
once to the correct time.  And it is good practice to
have the database down if you ever have to set the time
backwards.  E.g. if my system clock would be 15 minutes
to fast, I would keep the database down for at least 15
minutes after chaning the clock back to avoid mismatch
in the timestamps.

Regards,
Nikolaus Dilger

On Fri, 21 Feb 2003, "Donald Fraser" wrote:








Could somebody tell me the consequences 
of setting the date forward in time on the server
running PostgreSQL 
and then at a later date, after some transactions have
been 
committed, setting the date back in time?
 
Thanks in advance,
Donald Fraser



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


end of thread, other threads:[~2003-02-21 15:35 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-02-21 11:36 Changing the time on the server Donald Fraser <demolish@cwgsy.net>
2003-02-21 15:35 ` Tom Lane <tgl@sss.pgh.pa.us>
2003-02-21 15:23 Re: Changing the time on the server Nikolaus Dilger <nikolaus@dilger.cc>

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