Re: pg_upgrade if 'postgres' database is dropped

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Magnus Hagander <magnus(at)hagander(dot)net>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, Stephen Frost <sfrost(at)snowman(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_upgrade if 'postgres' database is dropped
Date: 2011-11-03 10:20:24
Message-ID: 201111031020.pA3AKOg21610@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Robert Haas wrote:
> On Wed, Nov 2, 2011 at 8:31 PM, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
> > Robert Haas wrote:
> >> >> > If nobody objects, I'll go do that. ?Hopefully that should be enough
> >> >> > to put this problem to bed more or less permanently.
> >> >>
> >> >> All right, I've worked up a (rather boring and tedious) patch to do
> >> >> this, which is attached.
> >> >
> >> > I wonder if we should bother using a flag for this. ?No one has asked
> >> > for one, and the new code to conditionally connect to databases should
> >> > function fine for most use cases.
> >>
> >> True, but OTOH we have such a flag for pg_dumpall, and I've already
> >> done the work.
> >
> > Well, every user-visible API option has a cost, and I am not sure there
> > is enough usefulness to overcome the cost of this.
>
> I am not sure why you think this is worth the time it takes to argue
> about it, but if you want to whack the patch around or just forget the
> whole thing, go ahead. The difference between what you're proposing
> and what I'm proposing is about 25 lines of code, so it hardly needs
> an acre of justification. To me, making the tools consistent with
> each other and not dependent on the user's choice of database names is
> worth the tiny amount of code it takes to make that happen.

Well, it would be good to get other opinions on this. The amount of
code isn't really the issue for me, but rather keeping the user API as
clean as possible.

I don't want someone to say, "Oh, here's a new user option. Wonder why
I should use it? Hmm, no one can tell me."

If an option's use-case is not clear, we have to explain in the docs why
to use it, and right now no one can tell me why we should use it.

> > Also, if we are going to add this flag, we should have pg_dumpall use it
> > too and just deprecate the old options.
>
> I thought about that, but couldn't think of a compelling reason to
> break backward compatibility.

Well, I figure we better have something compelling to do any change,
including a new command-line option.

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

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Marko Kreen 2011-11-03 10:26:43 Re: Multiple queries in transit
Previous Message Kohei KaiGai 2011-11-03 10:20:01 Re: [v9.2] Fix Leaky View Problem