Re: Re: [COMMITTERS] pgsql: Strengthen warnings about using pg_dump's -i option.

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Re: [COMMITTERS] pgsql: Strengthen warnings about using pg_dump's -i option.
Date: 2008-03-26 18:46:30
Message-ID: 200803261846.m2QIkUN22753@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Tom Lane wrote:
> Bruce Momjian <bruce(at)momjian(dot)us> writes:
> > Tom Lane wrote:
> >> My proposal would be to continue to accept the option but just ignore it
> >> (ie, error out on version mismatch whether or not -i is given). This
> >> way we wouldn't break any scripts that use the option, but things would
> >> still be safe.
>
> > A larger question is why the option was added in the first place.
>
> It probably seemed like the conservative choice at the time: allow the
> user to be smarter than pg_dump when necessary. What we couldn't have
> foreseen was the way the option has been abused by tools that are not as
> bright as they think they are. With the current situation where -i is
> used by default, without the user's knowledge (and without showing him
> the warning messages, which is why your patch isn't going to improve
> matters), it just seems too dangerous to continue to accept the switch.
>
> (I wonder whether some of the complaints we've seen about broken
> dump/restore are courtesy of pgAdmin forcing the dump to be taken with
> a too-old copy of pg_dump.)

Agreed, but I thought the tools have been fixed so is this still a
problem?

> One point after looking back at the previous discussion is that the
> current version test is too strict: it will complain if your server is
> 8.2.7 and pg_dump is 8.2.6. We probably should not make a newer minor
> number a hard error, since 99.99% of the time it would be fine. So
> while I think newer major should be a hard error regardless of -i,
> we could consider several responses to newer minor:
> * silently allow it always
> * print warning and proceed always
> * allow -i to control error vs warning for this case only.

I think it should be silent. Do we ever change the server behavior that
is visible to pg_dump in a minor release?

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

+ If your life is a hard drive, Christ can be your backup. +

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Alvaro Herrera 2008-03-26 18:49:00 pgsql: Rename snapmgmt.c/h to snapmgr.c/h, for consistency with other
Previous Message Tom Lane 2008-03-26 18:40:40 Re: Re: [COMMITTERS] pgsql: Strengthen warnings about using pg_dump's -i option.

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2008-03-26 19:00:23 Re: Re: [COMMITTERS] pgsql: Strengthen warnings about using pg_dump's -i option.
Previous Message Kurt Roeckx 2008-03-26 18:46:27 Re: gcc 4.3 breaks ContribCheck in 8.2 and older.