pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Koczan <pjkoczan@gmail.com>
To: pgsql-admin <pgsql-admin@postgresql.org>
Subject: pg_dumpall problems
Date: Mon, 29 Jan 2007 15:03:25 -0600
Message-ID: <4544e0330701291303u2ed1d2bclff520f6ecc99e832@mail.gmail.com> (raw)

Hi all,

Thanks for your help thus far. I almost have 8.2 ready (hooray no more
ancient 7.4). I do have one more problem which is likely the last thing
before pushing out live support. pg_dumpall isn't working.

Right now, we run pg_dumpall as a non-superuser, let's call it backup, whom
we give read access to the appropriate system tables (pg_shadow in 7.4,
pg_authid in 8.2), I get this error...
pg_dumpall: query failed: ERROR:  permission denied for relation pg_authid
pg_dumpall: query was: SELECT rolname, rolsuper, rolinherit, rolcreaterole,
rolcreatedb, rolcatupdate, rolcanlogin, rolconnlimit, rolpassword,
rolvaliduntil, pg_catalog.shobj_description(oid, 'pg_authid') as rolcomment
FROM pg_authid ORDER BY 1

The weird thing is, whenever I run this exact same command from psql as the
backup user, it works.

template1=> select current_role;
 current_user
--------------
 backup
(1 row)
template1=> \z pg_catalog.pg_authid;
                  Access privileges for database "template1"
   Schema   |   Name    | Type  |              Access privileges
------------+-----------+-------+----------------------------------------------
 pg_catalog | pg_authid | table |
{postgres=arwdxt/postgres,backup=r/postgres}

template1=> SELECT rolname, rolsuper, rolinherit, rolcreaterole,
rolcreatedb, rolcatupdate, rolcanlogin, rolconnlimit, rolpassword,
rolvaliduntil, pg_catalog.shobj_description(oid, 'pg_authid') as rolcomment
FROM pg_authid ORDER BY 1;
template1=> SELECT rolname, rolsuper, rolinherit, rolcreaterole,
rolcreatedb, rolcatupdate, rolcanlogin, rolconnlimit, rolpassword,
rolvaliduntil, pg_catalog.shobj_description(oid, 'pg_authid') as rolcomment
FROM pg_authid ORDER BY 1;
(There's data...glorious, glorious data).

The easy solution is to make backup a database superuser, but that's a
change I'd not like to make right now since I don't understand all the
security implications. What's the deal with this error, and is there any
nicer solution? Thanks much in advance.

Peter

view thread (5+ messages)  latest in thread

Message-ID: <4544e0330701291303u2ed1d2bclff520f6ecc99e832@mail.gmail.com>
Permalink:  ../4544e0330701291303u2ed1d2bclff520f6ecc99e832@mail.gmail.com/
Also on:    postgresql.org/message-id/4544e0330701291303u2ed1d2bclff520f6ecc99e832@mail.gmail.com

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: pjkoczan@gmail.com
  Subject: Re: pg_dumpall problems
  In-Reply-To: <4544e0330701291303u2ed1d2bclff520f6ecc99e832@mail.gmail.com>
  References: <4544e0330701291303u2ed1d2bclff520f6ecc99e832@mail.gmail.com>

* 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