Re: [GENERAL] pg_upgrade ?deficiency

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Karsten Hilbert <Karsten(dot)Hilbert(at)gmx(dot)net>
Cc: Kevin Grittner <kgrittn(at)ymail(dot)com>, Andres Freund <andres(at)2ndquadrant(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Hilbert, Sebastian" <Sebastian(dot)Hilbert(at)gmx(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [GENERAL] pg_upgrade ?deficiency
Date: 2013-11-29 16:33:42
Message-ID: 20131129163342.GD20216@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

On Fri, Nov 29, 2013 at 12:46:01AM +0100, Karsten Hilbert wrote:
> On Thu, Nov 28, 2013 at 10:39:18AM -0500, Bruce Momjian wrote:
>
> > Well, then we are actually using two different reasons for patching
> > pg_dumpall and not pg_dump. Your reason is based on the probability of
> > failure, while Tom/Kevin's reason is that default_transaction_read_only
> > might be used to block changes to a specific database, and they want a
> > pg_dump restore prevented, but a pg_dumpall restore to succeed.
>
> I can't really argue one way or another because *I* am
> not likely to be able to offer an actual patch. At any
> rate all I am interested in is that pg_upgrade does not
> fail to upgrade in surprising ways.

Once the patch is applied, I will be patching pg_upgrade by appending to
PGOPTIONS, but that will only be for 9.4. The patch will be too risky
and there are not enough problem reports to override that and warrant
backpatching.

> Regarding restoring a pg_dump IMO the line would need to
> be drawn along the -c/--clean option because using such seems
> to clearly say that, yes, the user *wants* data to be deleted.
>
> If -C/--create is used it shouldn't matter ...
>
> However, I'm not saying that this is how it is to
> be done. I am well aware that drawing such subtle
> distinctions is walking quite a fine line.

So you are saying that default_transaction_read_only should be turned
off by pg_dump if --clean is used? Interesting.

The bottom line is that we can't handle every case and if we tried the
code would be very complex and error-prone. I am not sure where to draw
the line but it has to be drawn somewhere.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ Everyone has their own god. +

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message John R Pierce 2013-11-29 19:58:09 Re: What query optimisations are included in Postgresql?
Previous Message Albe Laurenz 2013-11-29 12:58:27 Re: What query optimisations are included in Postgresql?

Browse pgsql-hackers by date

  From Date Subject
Next Message Marko Kreen 2013-11-29 16:43:22 Re: SSL: better default ciphersuite
Previous Message Andres Freund 2013-11-29 15:59:42 Re: MultiXact truncation, startup et al.