Re: tracking commit timestamps

Поиск
Список
Период
Сортировка
От Noah Misch
Тема Re: tracking commit timestamps
Дата
Msg-id 20141219065344.GA1831739@tornado.leadboat.com
обсуждение исходный текст
Ответ на Re: tracking commit timestamps  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Ответы Re: tracking commit timestamps  (Craig Ringer <craig@2ndquadrant.com>)
Re: tracking commit timestamps  (Michael Paquier <michael.paquier@gmail.com>)
Список pgsql-hackers
On Tue, Dec 16, 2014 at 01:05:31AM -0300, Alvaro Herrera wrote:
> Noah Misch wrote:
> > On Mon, Dec 15, 2014 at 12:12:10AM -0800, Michael Paquier wrote:
> 
> > > FWIW, I just tried that with MinGW-32 and I can see the error on Win7.
> > > I also checked that changing "< now()" to "<= now()" fixed the
> > > problem, so your assumption was right, Petr.
> > 
> > Committed, after fixing the alternate expected output.
> 
> Thanks.  I admit I don't understand what the issue is.

The test assumed that no two transactions of a given backend will get the same
timestamp value from now().  That holds so long as ticks of the system time
are small enough.  Not so on at least some Windows configurations.  Notice the
repeated timestamp values:
   Windows Server 2003 x64, 32-bit build w/ VS2010

localhost template1=# select clock_timestamp(), pg_sleep(.1 * (n % 2)) from generate_series(0,7) t(n);
clock_timestamp       | pg_sleep
 
-------------------------------+----------2014-12-18 08:34:34.522126+00 |2014-12-18 08:34:34.522126+00 |2014-12-18
08:34:34.631508+00|2014-12-18 08:34:34.631508+00 |2014-12-18 08:34:34.74089+00  |2014-12-18 08:34:34.74089+00
|2014-12-1808:34:34.850272+00 |2014-12-18 08:34:34.850272+00 |
 
(8 rows)
   GNU/Linux

[local] test=# select clock_timestamp(), pg_sleep(.1 * (n % 2)) from generate_series(0,7) t(n);       clock_timestamp
    | pg_sleep
 
-------------------------------+----------2014-12-19 06:49:47.590556+00 |2014-12-19 06:49:47.590611+00 |2014-12-19
06:49:47.691488+00|2014-12-19 06:49:47.691508+00 |2014-12-19 06:49:47.801483+00 |2014-12-19 06:49:47.801502+00
|2014-12-1906:49:47.921486+00 |2014-12-19 06:49:47.921505+00 |
 
(8 rows)



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: NUMERIC private methods?
Следующее
От: Andres Freund
Дата:
Сообщение: Re: Commitfest problems