Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n6Iaw-0003cG-CG for pgsql-bugs@arkaria.postgresql.org; Sat, 08 Jan 2022 20:45:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1n6Iav-0007Zb-99 for pgsql-bugs@arkaria.postgresql.org; Sat, 08 Jan 2022 20:45:45 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n6Iat-0007ZR-FL for pgsql-bugs@lists.postgresql.org; Sat, 08 Jan 2022 20:45:45 +0000 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n6Iak-0003jw-EY for pgsql-bugs@lists.postgresql.org; Sat, 08 Jan 2022 20:45:42 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id B59663200B8B; Sat, 8 Jan 2022 15:45:30 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Sat, 08 Jan 2022 15:45:31 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm3; bh=mqjFHfS07QTTaAqfYnnJ5azh+1v UsgAbIU7qL7sWM1o=; b=kQrD66oCJzyoIxgbRVzyTy1D0UX3752m0ikhHprCtE6 hTiy7svtYiSwp/GJ9HB/iAmtuG/0spGGqLzB3SiVKd05O4cq1RhfCCyi9tsJdR8o yLSw7dRIu/CdPShST3LT4yteUCFTVa7Ww74XPGY9aFw51Kid0tyWDUti1pJMGsZf bFWmYMEoGIJCItcHF91R+WU2ShPQTWmuFgDBWgMX7rFat8DYOftA+dxc+czOnpGj 4IRorkiQ6XXp9b39MKxuwaOiHxVur2hf1wZi9HIVezCah89yuSimo/2WPJ+XDmag fnQEZoPWd2FRieUhsDrRlPwwGlvsxW3nk+pNyHNbp7A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=mqjFHf S07QTTaAqfYnnJ5azh+1vUsgAbIU7qL7sWM1o=; b=kA8wFnN4015VZJR6wAugAX NXT0QLjtGhFUhQDtkGJM83JE1MazOOic+QAw8ojCyfPr6bh2DsQMrX57yL4LQSBh FgOT58KNEzbMwTWzRWnDBLL/r+ktV/37p/zckPelVbf0PDnf69D7Wclb2M08Glq1 SfqSp7K3UXMr39802Z1yWTlIyQloUxsTKnkw3bqYJ0Z4oNFVCMiccK2zDoePeoj2 3tTBiNEQzuDkJjw+z6ilOyLi6fw1rtKT4KC/ZOsw1YU7ptsdx9wvhwssU0jHJroF SI7z1XZuAiSMPu2Z24ouvT+ksgzLWu17l+UzfT44lwfpXIi+KUPbostMFTr/Xeqw == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrudeghedgudduiecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhepfffhvffukfhfgggtuggjsehttd ertddttddvnecuhfhrohhmpeetnhgurhgvshcuhfhrvghunhguuceorghnughrvghssegr nhgrrhgriigvlhdruggvqeenucggtffrrghtthgvrhhnpeegtefglefgffeugeetjeeufe euvdfhfeegteelteeujeegueeigeehfeekvdeiheenucffohhmrghinhepghhithhhuhgs rdgtohhmpdhmihgtrhhoshhofhhtrdgtohhmnecuvehluhhsthgvrhfuihiivgeptdenuc frrghrrghmpehmrghilhhfrhhomheprghnughrvghssegrnhgrrhgriigvlhdruggv X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 8 Jan 2022 15:45:29 -0500 (EST) Date: Sat, 8 Jan 2022 12:45:28 -0800 From: Andres Freund To: Tom Lane Cc: byavuz81@gmail.com, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #17358: While using --with-uuid=bsd option, uuid_ossp test fails on NetBSD 9.2 Message-ID: <20220108204528.f7viwyuxamdm2n34@alap3.anarazel.de> References: <17358-89806e7420797025@postgresql.org> <1377833.1641588532@sss.pgh.pa.us> <20220108194454.kl477tb6km6tyj5r@alap3.anarazel.de> <1581508.1641671996@sss.pgh.pa.us> <20220108200643.2ufdoxj5gdfvrrdg@alap3.anarazel.de> <1584605.1641674133@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1584605.1641674133@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On 2022-01-08 15:35:33 -0500, Tom Lane wrote: > Andres Freund writes: > > On 2022-01-08 14:59:56 -0500, Tom Lane wrote: > >> Right, I was planning to have a look at how they'd done it. The BSD > >> implementation seems to be inside the kernel, so that's not likely > >> to be helpful, but the other two must be in userspace. > > > https://github.com/tytso/e2fsprogs/blob/master/lib/uuid/gen_uuid.c#L240 > > https://github.com/sean-/ossp-uuid/blob/master/uuid_mac.c#L92 > > Thanks for the pointers! I was hoping for a Windows version, but > neither one seems to cover that. e2fs does have something, in a separate file: https://github.com/tytso/e2fsprogs/blob/master/lib/uuid/gen_uuid_nt.c but it looks pretty ugly. But it seems like it'd not be too hard to just use UuidCreateSequential() or UuidCreate() on windows. https://docs.microsoft.com/en-us/windows/win32/api/rpcdce/nf-rpcdce-uuidcreate > Before I start writing code, there seem to be two possible approaches > here: > > 1. Rip out all the external-library dependencies, lock stock and > barrel. contrib/uuid-ossp is always built. --with-uuid configure > argument becomes a no-op or an error. > > 2. contrib/uuid-ossp is always built, but if you say --with-uuid > then the existing code for that library is used. We fall back to > homegrown code if you didn't say --with-uuid. > > The main argument for #2 would be to preserve bug compatibility with > the existing behavior, in case (say) we pick a different interface's > MAC address than you got before. I suppose also it's possible that > the existing libraries try harder to avoid collisions across UUIDs > generated in different processes than I envision doing in our own > version. > > Whether these are good enough reasons to continue carrying all > that code is unclear to me. Thoughts? I'm inclined to think that we shouldn't carry that much code just for some pretty tenuous backward compatibility reasons. I wonder if we shouldn't just move all the uuid stuff to core, and make uuid-ossp be an empty shell for a few releases. It's already pretty confusingly named, with awkward quoting etc. In a few years it'll be completely unintelligible. > (I think v1 UUID uniqueness is snake-oil anyway, so I'm just thinking of > choosing a random "clock sequence" in each process and calling it good.) Hm. Not so sure about that... If we go there, why don't we just rip out the ability to create v1 UUIDs? Greetings, Andres Freund