Re: Locked out of schema public - Mailing list pgsql-general

From Peter
Subject Re: Locked out of schema public
Date
Msg-id 20191106214141.GA24734@gate.oper.dinoex.org
Whole thread Raw
In response to Locked out of schema public  (Peter <pmc@citylink.dinoex.sub.org>)
List pgsql-general
Hi Adrian,

okay, lets check these out:

> What is ${daily_pgsql_user} equal to?

postgres. The owner of the installation.

> I am not seeing -U postgres.
> Are you sure there is not something else specifying the user e.g. env 
> PGUSER?

I'm sure. The log shows the nightly backup connections as
postgres:<db>, and all connections except postgres:postgres work only
with kerberos - it cannot do much bogus there.

> What user are you doing below as?

Ordinary application user. The postgres and superusers do get access
to the tables.

> What does \dn+ show?

=> \dn+
                          List of schemas
  Name  |  Owner   |  Access privileges   |      Description       
--------+----------+----------------------+------------------------
 public | postgres | postgres=UC/postgres+| standard public schema
        |          | pgsql=UC/postgres    | 

And after restoring with "pg_restore -C -c -d postgres", when it works
correctly again, then it shows:

-> \dn+
                          List of schemas
  Name  |  Owner   |  Access privileges   |      Description       
--------+----------+----------------------+------------------------
 public | postgres | postgres=UC/postgres+| standard public schema
        |          | =UC/postgres        +| 
        |          | pgsql=UC/postgres    | 

So that was the command I was searching for. Thank You!


For now  I hold on the bug...

cheers,
PMc



pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Locked out of schema public (pg_dump lacks backup of the grant)
Next
From: Peter
Date:
Subject: Re: Locked out of schema public (pg_dump lacks backup of the grant)