pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: edwin.polkerman@splendiddata.com
Subject: BUG #16772: Options --disable-triggers in combination with --superuser does not have the expected result
Date: Mon, 14 Dec 2020 16:22:58 +0000
Message-ID: <16772-3c85d0bb913fa9e8@postgresql.org> (raw)

The following bug has been logged on the website:

Bug reference:      16772
Logged by:          Edwin Polkerman
Email address:      edwin.polkerman@splendiddata.com
PostgreSQL version: 13.1
Operating system:   CentOS 7.8.2003 (x86_64)
Description:        

Trying to create a dump with following command line:

   pg_dumpall -h <database host> -p 5432 -U user1 -f /tmp/dump.out
--disable-triggers -S user2 -v

User1 is a regular user and user2 is a superuser like the documentation
states: "Specify the superuser user name to use when disabling triggers"

Expected result:
The dump will complete without error's

Observed result:
Directly after starting the command following error is shown:

pg_dumpall: executing SELECT pg_catalog.set_config('search_path', '',
false);
pg_dumpall: executing SELECT oid, rolname, rolsuper, rolinherit,
rolcreaterole, rolcreatedb, rolcanlogin, rolconnlimit, rolpassword,
rolvaliduntil, rolreplication, rolbypassrls,
pg_catalog.shobj_description(oid, 'pg_authid') as rolcomment, rolname =
current_user AS is_current_user FROM pg_authid WHERE rolname !~ '^pg_' ORDER
BY 2
pg_dumpall: error: query failed: ERROR:  permission denied for table
pg_authid
pg_dumpall: error: query was: SELECT oid, rolname, rolsuper, rolinherit,
rolcreaterole, rolcreatedb, rolcanlogin, rolconnlimit, rolpassword,
rolvaliduntil, rolreplication, rolbypassrls,
pg_catalog.shobj_description(oid, 'pg_authid') as rolcomment, rolname =
current_user AS is_current_user FROM pg_authid WHERE rolname !~ '^pg_' ORDER
BY 2

Although a superuser is provided with -S, it looks like this is not used but
it uses the user (user1) making the connection in the connection string.

Running the command as superuser (-U user2) and omitting -S works as
expected



view thread (3+ messages)  latest in thread

Message-ID: <16772-3c85d0bb913fa9e8@postgresql.org>
Permalink:  ../16772-3c85d0bb913fa9e8@postgresql.org/
Also on:    postgresql.org/message-id/16772-3c85d0bb913fa9e8@postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: noreply@postgresql.org, pgsql-bugs@lists.postgresql.org, edwin.polkerman@splendiddata.com
  Subject: Re: BUG #16772: Options --disable-triggers in combination with --superuser does not have the expected result
  In-Reply-To: <16772-3c85d0bb913fa9e8@postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox