From: | Stefan Kaltenbrunner <stefan(at)kaltenbrunner(dot)cc> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | meetesh(dot)karia(at)alumni(dot)duke(dot)edu, pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: UUIDs generated using ossp-uuid on windows not unique |
Date: | 2008-06-16 20:01:57 |
Message-ID: | 4856C6B5.2030303@kaltenbrunner.cc |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Tom Lane wrote:
> Meetesh Karia <meetesh(dot)karia(at)gmail(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2008-06-16 22:57:41 | Re: UUIDs generated using ossp-uuid on windows not unique |
Previous Message | Tom Lane | 2008-06-16 18:25:17 | Re: UUIDs generated using ossp-uuid on windows not unique |