Re: [PATCH] Replacement for OSSP-UUID for Linux and BSD

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Matteo Beccati <php(at)beccati(dot)com>
Cc: Andres Freund <andres(at)2ndquadrant(dot)com>, pgsql-hackers list <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] Replacement for OSSP-UUID for Linux and BSD
Date: 2014-05-27 01:07:55
Message-ID: 6750.1401152875@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I wrote:
> Matteo Beccati <php(at)beccati(dot)com> writes:
>> On 26/05/2014 19:31, Andres Freund wrote:
>>> On 2014-05-26 13:25:49 -0400, Tom Lane wrote:
>>>> Matteo Beccati <php(at)beccati(dot)com> writes:
>>>>> * Restored --with-ossp-uuid. Configure tries ossp support first, then
>>>>> falls back to Linux and BSD variants

>>> Imo should be the other way round.

>> My goal was to avoid changing the underlying implementation if someone
>> has the ossp library installed. Tom is suggesting to split the configure
>> switch in two, so I guess that would allow the most flexibility.

> Yeah: if we have two configure switches then we can avoid having to decide
> which library takes precedence. But the main reason for that is we have
> a general policy that what you get from a given configure switch should be
> predictable, rather than depending on what is or is not installed. (If we
> were sure these libraries were 100% interchangeable then maybe one switch
> would be OK, but I'm not too sure about that, yet.)

Some research uncovered the fact that the e2fsprogs UUID library (ie the
"Linux" one) is available for FreeBSD too:
http://www.freshports.org/misc/e2fsprogs-libuuid/

This means that if we want to give users control over which implementation
gets selected, we actually need *three* configure switches. In the
attached revision of Matteo's patch, I called them --with-ossp-uuid
(the existing switch name), --with-linux-uuid, and --with-bsd-uuid.
I'm not necessarily wedded to the latter two names; in particular it seems
unfortunate that the right one to use on OS X is --with-linux-uuid.
But I think --with-e2fsprogs-uuid is right out, so it's not clear what
would be better.

I've verified functionality of this patch on these scenarios:

(1) --with-ossp-uuid on RHEL6, using uuid-1.6.1-10.el6.x86_64
(2) --with-linux-uuid on RHEL6, using libuuid-2.17.2-12.14.el6_5.x86_64
(3) --with-linux-uuid on OS X 10.9.3, Intel
(4) --with-linux-uuid on OS X 10.4.11, PPC (hence, bigendian)

I do not have a machine on which to try --with-bsd-uuid, so it's
possible I broke that portion of Matteo's patch. Would someone try
that case on a FreeBSD box?

Other than retesting that case, I think this is ready to go except that
it lacks documentation updates.

regards, tom lane

Attachment Content-Type Size
uuid_v3.patch text/x-diff 42.5 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2014-05-27 01:46:44 Re: Re: popen and pclose redefinitions causing many warning in Windows build
Previous Message Michael Paquier 2014-05-27 00:58:55 Extending MSVC scripts to support --with-extra-version