Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 2E6F69FB5AD for ; Tue, 10 Apr 2007 18:25:22 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 01351-04 for ; Tue, 10 Apr 2007 18:25:08 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 17F519FB5C2 for ; Tue, 10 Apr 2007 18:25:09 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id l3ALP5MQ003598; Tue, 10 Apr 2007 17:25:05 -0400 (EDT) To: Neil Conway cc: Peter Eisentraut , Gevik Babakhani , pgsql-hackers@postgresql.org Subject: Re: [DOCS] uuid type not documented In-reply-to: <1176233452.6558.52.camel@localhost.localdomain> References: <200704101724.27285.peter_e@gmx.net> <1176219030.6558.47.camel@localhost.localdomain> <200704101828.58118.peter_e@gmx.net> <1176233452.6558.52.camel@localhost.localdomain> Comments: In-reply-to Neil Conway message dated "Tue, 10 Apr 2007 15:30:52 -0400" Date: Tue, 10 Apr 2007 17:25:05 -0400 Message-ID: <3597.1176240305@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200704/453 X-Sequence-Number: 101786 Neil Conway writes: > On Tue, 2007-04-10 at 18:28 +0200, Peter Eisentraut wrote: >> The problem is that most of the standard methods are platform dependent, as >> they require MAC addresses or a "good" random source, for instance. > http://archives.postgresql.org/pgsql-patches/2007-01/msg00392.php > ISTM random() or similar sources is a sufficient PSRNG for the purposes > of UUID generation -- I can't see anything in the RFC that would > contradict that. Doesn't seem like quite enough bits of uniqueness. We could improve matters by incorporating the database's pg_control.system_identifier into the UUID, substituting for the MAC address we don't have a good way to get. system_identifier is currently determined by the system clock at initdb time (to gettimeofday precision), so it would add at least some additional bits of randomness... regards, tom lane