pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruce Momjian <bruce@momjian.us>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: m.sakrejda@gmail.com
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #6706: pg_upgrade fails when plpgsql dropped/re-created
Date: Sat, 30 Jun 2012 12:28:58 -0400
Message-ID: <20120630162858.GC20759@momjian.us> (raw)
In-Reply-To: <11221.1341069176@sss.pgh.pa.us>
References: <E1SjIEG-0007Xu-PW@wrigleys.postgresql.org>
	<20120630015430.GA912@momjian.us>
	<336.1341027315@sss.pgh.pa.us>
	<20120630050007.GA20759@momjian.us>
	<11221.1341069176@sss.pgh.pa.us>

On Sat, Jun 30, 2012 at 11:12:56AM -0400, Tom Lane wrote:
> Bruce Momjian <bruce@momjian.us> writes:
> > On Fri, Jun 29, 2012 at 11:35:15PM -0400, Tom Lane wrote:
> >> I think you're misjudging the core of the issue.  The same thing
> >> would happen if somebody dropped and recreated the public schema.
> >> Or anything else that we create at initdb time but allow to be
> >> dropped.
> 
> > I just tested dropping and recreating the 'public' schema and pg_upgrade
> > worked fine.
> 
> Did it restore the nonstandard ownership of the schema?  Your proposed
> fix for plpgsql won't preserve the previous state of the extension.
> (Maybe we don't care, but it needs consideration.)

My point was that drop/create of the public schema does not generate a
pg_upgrade error like plpgsql does.

Let me address the schema question here and the plpgsql issue in the
next email.

> Did it restore the nonstandard ownership of the schema?

No --- drop/create of the public schema produces:

	test=> \dn+
	                   List of schemas
	  Name  |  Owner   | Access privileges | Description
	--------+----------+-------------------+-------------
	 public | postgres |                   |
	(1 row)

while the original shipped public and the post-upgrade of a drop/created
schema are:

	test=> \dn+
	                          List of schemas
	  Name  |  Owner   |  Access privileges   |      Description
	--------+----------+----------------------+------------------------
	 public | postgres | postgres=UC/postgres+| standard public schema
	        |          | =UC/postgres         |
	(1 row)

However, surprisingly, a simple pg_dump/restore also does not preserve
the public schema permissions either.  :-(

-- 
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + It's impossible for everything to be true. +



view thread (28+ messages)  latest in thread

Message-ID: <20120630162858.GC20759@momjian.us>
Permalink:  ../20120630162858.GC20759@momjian.us/
Also on:    postgresql.org/message-id/20120630162858.GC20759@momjian.us

 · 

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-bugs@postgresql.org
  Cc: bruce@momjian.us, tgl@sss.pgh.pa.us, m.sakrejda@gmail.com
  Subject: Re: BUG #6706: pg_upgrade fails when plpgsql dropped/re-created
  In-Reply-To: <20120630162858.GC20759@momjian.us>
  References: <E1SjIEG-0007Xu-PW@wrigleys.postgresql.org> <20120630015430.GA912@momjian.us> <336.1341027315@sss.pgh.pa.us> <20120630050007.GA20759@momjian.us> <11221.1341069176@sss.pgh.pa.us> <20120630162858.GC20759@momjian.us>

* 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