Lists: | pgsql-general |
---|
From: | François SIMON <francois(dot)simon(at)free(dot)fr> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | post-bootstrap init : permission denied pg_description |
Date: | 2024-09-12 10:58:30 |
Message-ID: | 241898171.198702953.1726138710864.JavaMail.root@zimbra28-e5.priv.proxad.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-general |
Hello All,
I am trying to install PostgreSQL 16.4 on AIX 7.1.
I get an error at initdb step :
performing post-bootstrap initialization ... 2024-09-12 12:09:07.075 CEST [14745748] FATAL: permission denied for table pg_description
This version of PostgreSQL was build on this machine with
IBM XL C compiler 10.1 :
export OBJECT_MODE=64
$srcdir/configure --prefix=$instdir --without-icu
make
make install
When I run initdb with -n option, I can see that files in
PGDATA directory seem to have expected permissions.
I have tried to install PostgreSQL 15.1, 16.0 and 16.3
but got the same error with all these versions.
Any help would be appreciated.
François
From: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> |
---|---|
To: | François SIMON <francois(dot)simon(at)free(dot)fr>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: post-bootstrap init : permission denied pg_description |
Date: | 2024-09-12 15:20:59 |
Message-ID: | 5616584c-97c1-4b65-a6d5-a957782c44c1@aklaver.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | Postg토토 사이트 추천SQL |
On 9/12/24 03:58, François SIMON wrote:
> Hello All,
>
> I am trying to install PostgreSQL 16.4 on AIX 7.1.
>
> I get an error at initdb step :
>
> performing post-bootstrap initialization ... 2024-09-12 12:09:07.075 CEST [14745748] FATAL: permission denied for table pg_description
That looks like an issue with the user you are running the command as.
What user is that?
What is the complete initdb command you used?
>
> This version of PostgreSQL was build on this machine with
> IBM XL C compiler 10.1 :
>
> export OBJECT_MODE=64
> $srcdir/configure --prefix=$instdir --without-icu
> make
> make install
>
> When I run initdb with -n option, I can see that files in
> PGDATA directory seem to have expected permissions.
>
> I have tried to install PostgreSQL 15.1, 16.0 and 16.3
> but got the same error with all these versions.
>
> Any help would be appreciated.
>
> François
>
>
--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com
From: | François SIMON <francois(dot)simon(at)free(dot)fr> |
---|---|
To: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: post-bootstrap init : permission denied pg_description |
Date: | 2024-09-12 16:03:47 |
Message-ID: | ZuMQ44BSc4kpaBhK@corindon.frsi.fr |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-general |
Le Thu, Sep 12, 2024 at 08:20:59AM -0700, Adrian Klaver a écrit :
> On 9/12/24 03:58, François SIMON wrote:
> > Hello All,
> >
> > I am trying to install PostgreSQL 16.4 on AIX 7.1.
> >
> > I get an error at initdb step :
> >
> > performing post-bootstrap initialization ... 2024-09-12 12:09:07.075 CEST [14745748] FATAL: permission denied for table pg_description
>
> That looks like an issue with the user you are running the command as.
>
> What user is that?
A normal user account.
> What is the complete initdb command you used?
I use no option.
PGDATA is set to a subdirectory of $HOME for this user.
$HOME is on a NFS volume.
# export PGDATA=$HOME/data
# initdb
The files belonging to this database system will be owned by user "fsi".
This user must also own the server process.
The database cluster will be initialized with locale "C".
The default database encoding has accordingly been set to "SQL_ASCII".
The default text search configuration will be set to "english".
Data page checksums are disabled.
creating directory /net/h10/home/fsi/data ... ok
creating subdirectories ... ok
selecting dynamic shared memory implementation ... posix
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting default time zone ... Europe/Paris
creating configuration files ... ok
running bootstrap script ... ok
Thank you for your help.
François
From: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> |
---|---|
To: | François SIMON <francois(dot)simon(at)free(dot)fr> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: post-bootstrap init : permission denied pg_description |
Date: | 2024-09-12 16:52:57 |
Message-ID: | 49204586-6b6b-45aa-bc7a-671c67478aba@aklaver.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-general |
On 9/12/24 09:03, François SIMON wrote:
> Le Thu, Sep 12, 2024 at 08:20:59AM -0700, Adrian Klaver a écrit :
>> On 9/12/24 03:58, François SIMON wrote:
>>> Hello All,
> A normal user account.
Is that the account you did the make install as?
> PGDATA is set to a subdirectory of $HOME for this user.
> $HOME is on a NFS volume.
Have you read this?:
/docs/16/creating-cluster.html#CREATING-CLUSTER-FILESYSTEM
> creating directory /net/h10/home/fsi/data ... ok
> creating subdirectories ... ok
> selecting dynamic shared memory implementation ... posix
> selecting default max_connections ... 100
> selecting default shared_buffers ... 128MB
> selecting default time zone ... Europe/Paris
> creating configuration files ... ok
> running bootstrap script ... ok
Can you add the complete portion of the output that threw the error?
>
> Thank you for your help.
>
> François
--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com
From: | François SIMON <francois(dot)simon(at)free(dot)fr> |
---|---|
To: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: post-bootstrap init : permission denied pg_description |
Date: | 2024-09-12 17:06:39 |
Message-ID: | ZuMfn0xPo91YJ+ao@corindon.frsi.fr |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-general |
Le Thu, Sep 12, 2024 at 06:03:47PM +0200, François SIMON a écrit :
> Le Thu, Sep 12, 2024 at 08:20:59AM -0700, Adrian Klaver a écrit :
> > On 9/12/24 03:58, François SIMON wrote:
> > > Hello All,
> > >
> > > I am trying to install PostgreSQL 16.4 on AIX 7.1.
> > >
> > > I get an error at initdb step :
> > >
> > > performing post-bootstrap initialization ... 2024-09-12 12:09:07.075 CEST [14745748] FATAL: permission denied for table pg_description
> >
> > That looks like an issue with the user you are running the command as.
> >
> > What user is that?
>
> A normal user account.
>
I think the environment is ok because it works with an initdb
built with gcc.
# ls -l /prod/postgresql
V16.3 -> V16.3-build_gcc
V16.3-build_gcc
V16.3-build_xlc
# initdb
Success. You can start the database...
# ln -sf V16.3-build_xlc /prod/postgresl/V16.3
V16.3 -> V16.3-build_xlc
V16.3-build_gcc
V16.3-build_xlc
# pg_ctl -l logfile start
server started
# psql -d template1
psql (16.3à
Type "help" for help.
template1=# \l
List of databases
Name
--------
postgres
template0
template1
...
So the problem seems to come from xlc, and only at initdb step.
I can see that initdb runs a backend postgres in single user mode.
And this is this backend, when compiled with xlc, that shows :
FATAL: permission denied for table pg_description
François
From: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> |
---|---|
To: | François SIMON <francois(dot)simon(at)free(dot)fr> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: post-bootstrap init : permission denied pg_description |
Date: | 2024-09-12 17:15:56 |
Message-ID: | 0273cb12-30aa-4f8e-a5ed-2dcbae8ce351@aklaver.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-general |
On 9/12/24 10:06, François SIMON wrote:
> Le Thu, Sep 12, 2024 at 06:03:47PM +0200, François SIMON a écrit :
>> Le Thu, Sep 12, 2024 at 08:20:59AM -0700, Adrian Klaver a écrit :
>>> On 9/12/24 03:58, François SIMON wrote:
>>>> Hello All,
> So the problem seems to come from xlc, and only at initdb step.
> I can see that initdb runs a backend postgres in single user mode.
> And this is this backend, when compiled with xlc, that shows :
> FATAL: permission denied for table pg_description
Well this is going to need someone else to troubleshoot as it is out of
my depth.
>
> François
--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com
From: | François SIMON <francois(dot)simon(at)free(dot)fr> |
---|---|
To: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: post-bootstrap init : permission denied pg_description |
Date: | 2024-09-12 17:20:53 |
Message-ID: | ZuMi9d9OetT0wPVJ@corindon.frsi.fr |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-general |
Le Thu, Sep 12, 2024 at 09:52:57AM -0700, Adrian Klaver a écrit :
> On 9/12/24 09:03, François SIMON wrote:
> > $HOME is on a NFS volume.
>
> Have you read this?:
>
> /docs/16/creating-cluster.html#CREATING-CLUSTER-FILESYSTEM
Yes. I understand NFS is OK, but yes I see some warnings.
> > selecting default time zone ... Europe/Paris
> > creating configuration files ... ok
> > running bootstrap script ... ok
>
> Can you add the complete portion of the output that threw the error?
# initdb
The files belonging to this database system will be owned by user "fsi".
This user must also own the server process.
The database cluster will be initialized with locale "C".
The default database encoding has accordingly been set to "SQL_ASCII".
The default text search configuration will be set to "english".
Data page checksums are disabled.
creating directory /net/h10/home/fsi/data ... ok
creating subdirectories ... ok
selecting dynamic shared memory implementation ... posix
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting default time zone ... Europe/Paris
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... 2024-09-12 17:38:35.580 CEST [9896122] FATAL: permission denied for table pg_description
2024-09-12 17:38:35.580 CEST [9896122] STATEMENT:
WITH funcdescs AS ( SELECT p.oid as p_oid, o.oid as o_oid, oprname FROM pg_proc p JOIN pg_operator o ON oprcode = p.oid ) INSERT INTO pg_description SELECT p_oid, 'pg_proc'::regclass, 0, 'implementation of ' || oprname || ' operator' FROM funcdescs WHERE NOT EXISTS (SELECT 1 FROM pg_description WHERE objoid = p_oid AND classoid = 'pg_proc'::regclass) AND NOT EXISTS (SELECT 1 FROM pg_description WHERE objoid = o_oid AND classoid = 'pg_operator'::regclass AND description LIKE 'deprecated%');
child process exited with exit code 1
initdb: removing data directory "/net/h10/home/fsi/data"
François
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | François SIMON <francois(dot)simon(at)free(dot)fr> |
Cc: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: post-bootstrap init : permission denied pg_description |
Date: | 2024-09-12 17:38:11 |
Message-ID: | 4039017.1726162691@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-general |
=?iso-8859-1?Q?Fran=E7ois?= SIMON <francois(dot)simon(at)free(dot)fr> writes:
> So the problem seems to come from xlc, and only at initdb step.
> I can see that initdb runs a backend postgres in single user mode.
> And this is this backend, when compiled with xlc, that shows :
> FATAL: permission denied for table pg_description
Yeah. This seems like it must be an xlc code-generation bug.
It's got nothing to do with filesystem permissions: you're failing
an ACL check at the logical "table" level, which you should not
be because single-user mode implies superuser permissions.
We do have one buildfarm member building with 64-bit xlc on
AIX 7.1:
https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=hornet&dt=2024-09-11%2003%3A51%3A02
I see that that uses a bunch of odd CFLAGS, but they look like they
are mostly to suppress compiler warnings. Another important bit of
the recipe for AIX is -D_LARGE_FILES=1, but I'm not sure that that
would have any impact during initdb (since we're not dealing with
any large files at that point).
You could perhaps try different -O optimization levels. Also
make sure your xlc is up-to-date.
regards, tom lane
From: | François SIMON <francois(dot)simon(at)free(dot)fr> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: post-bootstrap init : permission denied pg_description |
Date: | 2024-09-13 14:15:59 |
Message-ID: | ZuRJHwbOu/wqvkgA@corindon.frsi.fr |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-general |
Le Thu, Sep 12, 2024 at 01:38:11PM -0400, Tom Lane a écrit :
> =?iso-8859-1?Q?Fran=E7ois?= SIMON <francois(dot)simon(at)free(dot)fr> writes:
> > So the problem seems to come from xlc, and only at initdb step.
> > I can see that initdb runs a backend postgres in single user mode.
> > And this is this backend, when compiled with xlc, that shows :
> > FATAL: permission denied for table pg_description
>
> Yeah. This seems like it must be an xlc code-generation bug.
> It's got nothing to do with filesystem permissions: you're failing
> an ACL check at the logical "table" level, which you should not
> be because single-user mode implies superuser permissions.
>
> We do have one buildfarm member building with 64-bit xlc on
> AIX 7.1:
>
> https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=hornet&dt=2024-09-11%2003%3A51%3A02
>
> I see that that uses a bunch of odd CFLAGS, but they look like they
> are mostly to suppress compiler warnings. Another important bit of
> the recipe for AIX is -D_LARGE_FILES=1, but I'm not sure that that
> would have any impact during initdb (since we're not dealing with
> any large files at that point).
>
> You could perhaps try different -O optimization levels. Also
> make sure your xlc is up-to-date.
Thank you for all this information.
Unfortunately I haven't obtained any better results yet.
I tried -O2, -O3, with or without -D_LARGE_FILES=1, xlc_r instead
of xlc, and all the same flags as the buildfarm member.
I will try with another version of xlc if possible.
François
>
> regards, tom lane