Re: configure --with-uuid=bsd fails on NetBSD

From: Nazir Bilal Yavuz <byavuz81(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Andres Freund <andres(at)anarazel(dot)de>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: configure --with-uuid=bsd fails on NetBSD
Date: 2022-09-09 14:54:07
Message-ID: a74d9c90-54f9-a73e-8936-2f1dc927772d@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 8/26/22 19:21, Tom Lane wrote:
> Nazir Bilal Yavuz <byavuz81(at)gmail(dot)com> writes:
>> Based on these discussions, I attached a patch.
>
> I think the right fix is to call uuid_create and then actually check
> the version field of the result. This avoids breaking what need not
> be broken, and it'd also guard against comparable problems on other
> platforms (so don't blame NetBSD specifically in the message, either).

I updated my patch. I checked version field in 'uuid_generate_internal'
function instead of checking it in 'uuid_generate_v1' and
'uuid_generate_v1mc' functions, but I have some questions:

1 - Should it be checked only for  '--with-uuid=bsd' option?
    1.1 - If it is needed to be checked only for '--with-uuid=bsd',
should just NetBSD be checked?
2 - Should it error out without including current UUID version in the
error message? General error message could mask if the 'uuid_create'
function starts to produce UUIDs other than version-4.

Regards,
Nazir Bilal Yavuz

Attachment Content-Type Size
v2-0001-error-out-uuid_create-function.patch text/x-patch 5.6 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Japin Li 2022-09-09 15:18:04 Remove redundant code in pl_exec.c
Previous Message Robert Haas 2022-09-09 14:53:47 Re: HOT chain validation in verify_heapam()