Re: [GENERAL] pg_upgrade ?deficiency - Mailing list pgsql-hackers

From Andres Freund
Subject Re: [GENERAL] pg_upgrade ?deficiency
Date
Msg-id 20131122211904.GF17400@alap2.anarazel.de
Whole thread Raw
In response to Re: [GENERAL] pg_upgrade ?deficiency  (Kevin Grittner <kgrittn@ymail.com>)
Responses Re: [GENERAL] pg_upgrade ?deficiency  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: [GENERAL] pg_upgrade ?deficiency  (Kevin Grittner <kgrittn@ymail.com>)
List pgsql-hackers
On 2013-11-22 13:07:29 -0800, Kevin Grittner wrote:
> Andres Freund <andres@2ndquadrant.com> wrote:
> 
> > are you sure it also unsets default_transaction_readonly for
> > the roles etc. it creates?
> 
> I'm not sure I understand.  Could you give an example of what
> you're concerned about?

pg_dumpall first spits out global data (users, databases, tablespaces)
and then invokes pg_dump for every single database. So I'd very strongly
suspect that your patch will issue the CREATE ROLE etc. calls without
unsetting default_transaction_readonly.

E.g. output looks like:
--
-- PostgreSQL database cluster dump
--
..
CREATE ROLE andres;
ALTER ROLE andres WITH SUPERUSER INHERIT CREATEROLE CREATEDB LOGIN
REPLICATION;
...
\connect postgres

--
-- PostgreSQL database dump
--


CREATE TABLE pgbench_accounts (   aid integer NOT NULL,   bid integer,   abalance integer,   filler character(84)
)
WITH (fillfactor=100);

...
\connect regression
...


Greetings,

Andres Freund

-- Andres Freund                       http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training &
Services



pgsql-hackers by date:

Previous
From: Kevin Grittner
Date:
Subject: Re: [GENERAL] pg_upgrade ?deficiency
Next
From: Tom Lane
Date:
Subject: Re: [GENERAL] pg_upgrade ?deficiency