Re: initdb error - Mailing list pgsql-general

From David Noel
Subject Re: initdb error
Date
Msg-id CAHAXwYBmmxQK4YkRrx3xbS3Riz4b9m-dAZxU-_npJmWTGaL9uA@mail.gmail.com
Whole thread Raw
In response to Re: initdb error  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: initdb error  (Amitabh Kant <amitabhkant@gmail.com>)
List pgsql-general
> You need to talk to some FreeBSD kernel hackers about why link()
> might be failing here.  Since you see it on UFS too, we can probably
> exonerate the ZFS filesystem-specific code.
>
> I did some googling and found that EPERM can be issued if the filesystem
> doesn't support hard links (which shouldn't apply to ZFS I trust).
> Also, Linux has a "protected_hardlinks" option that causes certain
> attempts at creating hard links to fail --- but our use-case here
> doesn't fall foul of any of those restrictions AFAICS, and of course
> FreeBSD isn't Linux.  Still, I wonder if you're running into some
> misdesigned or misimplemented security restriction.  You might want
> to look at your kernel parameters and see if any of them look like
> they might have to do with restricting hard-link operations.
>
> Also, since Amitabh failed to duplicate the failure on both earlier
> and later FreeBSD kernels, and we've not heard reports of this from
> anybody else either, it seems more than possible that it's a plain
> old bug in the specific kernel version you're using.
>
> As a short-term workaround, I'd suggest rebuilding with
> HAVE_WORKING_LINK disabled.  (Just remove that #define from
> src/include/pg_config_manual.h and rebuild.)

OK, thanks. I've gotten in touch with the freebsd-hackers mailing
list. Hopefully we'll be able to get this one figured out.

I compiled a GENERIC kernel and tried it again. Still no luck. But at
least we know now it wasn't a configuration error.


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Problems with a custom LOCALE
Next
From: Amitabh Kant
Date:
Subject: Re: initdb error