Re: Time slowly goes out of sync Cygwin+windows+psotgres

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Time slowly goes out of sync Cygwin+windows+psotgres
Дата
Msg-id 26510.1030630474@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Time slowly goes out of sync Cygwin+windows+psotgres  (Aaron <aarmel@netagi.com>)
Ответы Re: Time slowly goes out of sync  ("Chad R. Larson" <chad@eldocomp.com>)
Список pgsql-admin
Aaron <aarmel@netagi.com> writes:
> Is postgres calculateing the time itself or reading of the machines clock?

Postgres just asks the OS what time it is.  I think you have an
off-speed system clock crystal (lots of PC-grade hardware will
gain or lose 10 minutes/month :-().

I don't know what test you are using to convince yourself that the OS
time is correct when Postgres' time is different --- but I'll bet lunch
you made a mistake.

One other thing to watch for is that "SELECT now()" returns the time as
of the start of the current transaction.  If you said "begin" and then
waited ten minutes you could get a 10-minute discrepancy.  I doubt you
did that, but it's something to be aware of.

            regards, tom lane

В списке pgsql-admin по дате отправления:

Предыдущее
От: "Mark McEahern"
Дата:
Сообщение: Re: programatically obtaining table layout
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Createlang problem.