Re: UUIDs generated using ossp-uuid on windows not unique

Поиск
Список
Период
Сортировка
От Stefan Kaltenbrunner
Тема Re: UUIDs generated using ossp-uuid on windows not unique
Дата
Msg-id 4856C6B5.2030303@kaltenbrunner.cc
обсуждение исходный текст
Ответ на Re: UUIDs generated using ossp-uuid on windows not unique  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: UUIDs generated using ossp-uuid on windows not unique
Список pgsql-bugs
Tom Lane wrote:
> Meetesh Karia <meetesh.karia@gmail.com> writes:
>> As best as I can tell, the problem is caused because generation of v1
>> UUIDs uses GetSystemTimeAsFileTime which is stated to have a resolution
>> of 100 nanoseconds but in practice has a resolution of around 15ms
>> (http://www.ddj.com/showArticle.jhtml?documentID=win0305a&pgno=17).
>
> Well, any real-time clock reading is going to have finite resolution.
> If your app is expecting that version-1 UUIDs generated in rapid
> succession will be distinct, I think your app is broken.  It's just
> a little more obvious on Windows :-(.
>
> Perhaps the v4 generation method would work better for you?

actually this has been reported before and seems to be an issue in the
windows port of the ossp-uuid library:


http://archives.postgresql.org/pgsql-bugs/2008-05/msg00059.php


Stefan

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: UUIDs generated using ossp-uuid on windows not unique
Следующее
От: Tom Lane
Дата:
Сообщение: Re: UUIDs generated using ossp-uuid on windows not unique