Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VYMqv-0001JT-Qn for pgsql-bugs@arkaria.postgresql.org; Mon, 21 Oct 2013 21:17:29 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VYMqv-0000pz-93 for pgsql-bugs@arkaria.postgresql.org; Mon, 21 Oct 2013 21:17:29 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VYMqu-0000pc-AS for pgsql-bugs@postgresql.org; Mon, 21 Oct 2013 21:17:28 +0000 Received: from mahout.postgresql.org ([2001:4800:7903:4::123]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VYMqp-0007aF-IT for pgsql-bugs@postgresql.org; Mon, 21 Oct 2013 21:17:28 +0000 Received: from wrigleys.postgresql.org ([204.145.124.246]) by mahout.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VYMqo-0005WX-72 for pgsql-bugs@postgresql.org; Mon, 21 Oct 2013 21:17:22 +0000 Received: from www-data by wrigleys.postgresql.org with local (Exim 4.80) (envelope-from ) id 1VYMqi-0001P4-P4 for pgsql-bugs@postgresql.org; Mon, 21 Oct 2013 21:17:16 +0000 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: BUG #8545: pg_dump fails to backup database level grants To: pgsql-bugs@postgresql.org From: lalbin@fhcrc.org Message-Id: Date: Mon, 21 Oct 2013 21:17:16 +0000 X-Pg-Spam-Score: -2.3 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org The following bug has been logged on the website: Bug reference: 8545 Logged by: Lloyd Albin Email address: lalbin@fhcrc.org PostgreSQL version: 9.3.1 Operating system: SUSE Linux (64-bit) Description: Most people I know, including myself, use pg_dumpall -g to dump out the globals such as user accounts and then use pg_dump -Fc or -Fd to dump out their databases in the compressed formats. When doing this method the database level grants have been missed, although if people used the pg_dumpall to dump the entire server they will be dumped, but not in a compressed format that they can use with pg_restores multi-job. I have tested this issue with Postgres Versions: 9.0.12 9.2.4 9.3.0 9.3.1 You may easily test this by doing: CREATE DATABASE new_db WITH OWNER = postgres ENCODING = 'UTF8' TEMPLATE = template0; GRANT CREATE ON DATABASE new_db TO dw; CREATE ROLE dw WITH LOGIN PASSWORD 'test'; pg_dump -Fc new_db -f new_db.pgdump pg_restore -Fc new_db.pgdump -C > new_db.sql We can now look at the new_db.sql and can see that there is no database level grants such as granting the CREATE to dw. Lloyd Albin Statistical Center for HIV/AIDS Research and Prevention (SCHARP) Vaccine and Infectious Disease Division (VIDD) Fred Hutchinson Cancer Research Center (FHCRC) -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs