Re: pg_dump -X

Lists: pgsql-hackers
From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: pg_dump -X
Date: 2010-12-24 04:35:26
Message-ID: AANLkTinksTk9+YoHDSdkAep6p=m_6U6r9dC2NBJEN2Ja@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Back in 2006, we have this commit:

commit 2b25e1169f44368c120931787628d51731b5cc8c
Author: Peter Eisentraut <peter_e(at)gmx(dot)net>
Date: Sat Oct 7 20:59:05 2006 +0000

The -X option in pg_dump was supposed to be a workaround for the lack of
portable long options. But we have had portable long options for a long
time now, so this is obsolete. Now people have added options which *only*
work with -X but not as regular long option, so I'm putting a stop to this:
-X is deprecated; it still works, but it has been removed from the
documentation, and please don't add more of them.

Since then, two additional -X options have crept in, doubtless due to
mimicry of the existing options without examination of the commit
logs. I think we should either (a) remove the -X option altogether or
(b) change the comment so that it clearly states the same message that
appears here in the commit log, namely, that no new -X options are to
be created. The existing comment says that -X is deprecated, but that
doesn't make it entirely 100% clear that the code isn't intended to be
further updated, at least judging by the results.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


From: "J(dot) Roeleveld" <joost(at)antarean(dot)org>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: pg_dump -X
Date: 2010-12-24 07:32:44
Message-ID: 201012240832.44925.joost@antarean.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Friday 24 December 2010 05:35:26 Robert Haas wrote:
> Back in 2006, we have this commit:
>
> commit 2b25e1169f44368c120931787628d51731b5cc8c
> Author: Peter Eisentraut <peter_e(at)gmx(dot)net>
> Date: Sat Oct 7 20:59:05 2006 +0000
>
> The -X option in pg_dump was supposed to be a workaround for the lack
> of portable long options. But we have had portable long options for a
> long time now, so this is obsolete. Now people have added options which
> *only* work with -X but not as regular long option, so I'm putting a stop
> to this: -X is deprecated; it still works, but it has been removed from
> the documentation, and please don't add more of them.
>
> Since then, two additional -X options have crept in, doubtless due to
> mimicry of the existing options without examination of the commit
> logs. I think we should either (a) remove the -X option altogether or
> (b) change the comment so that it clearly states the same message that
> appears here in the commit log, namely, that no new -X options are to
> be created. The existing comment says that -X is deprecated, but that
> doesn't make it entirely 100% clear that the code isn't intended to be
> further updated, at least judging by the results.

Just a thought, but wouldn't a bit warning that appears when someone actually
uses the "-X" option informing the user that it's deprecated prevent further
ones to appear?

Are there situations where the -X option are actually required? Can't the code
be adapted to use different options then the "-X" one?

Also, unless Gentoo actually strips the man-page and "--help" page (which I do
seriously doubt), I do not see the "-X" option in the documentation.

--
Joost


From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: pg_dump -X
Date: 2011-03-11 03:36:55
Message-ID: 201103110336.p2B3atU16338@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Robert Haas wrote:
> Back in 2006, we have this commit:
>
> commit 2b25e1169f44368c120931787628d51731b5cc8c
> Author: Peter Eisentraut <peter_e(at)gmx(dot)net>
> Date: Sat Oct 7 20:59:05 2006 +0000
>
> The -X option in pg_dump was supposed to be a workaround for the lack of
> portable long options. But we have had portable long options for a long
> time now, so this is obsolete. Now people have added options which *only*
> work with -X but not as regular long option, so I'm putting a stop to this:
> -X is deprecated; it still works, but it has been removed from the
> documentation, and please don't add more of them.
>
> Since then, two additional -X options have crept in, doubtless due to
> mimicry of the existing options without examination of the commit
> logs. I think we should either (a) remove the -X option altogether or
> (b) change the comment so that it clearly states the same message that
> appears here in the commit log, namely, that no new -X options are to
> be created. The existing comment says that -X is deprecated, but that
> doesn't make it entirely 100% clear that the code isn't intended to be
> further updated, at least judging by the results.

Code comment added with attached, applied patch.

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

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

Attachment Content-Type Size
/rtmp/pg_dump.diff text/x-diff 790 bytes

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: pg_dump -X
Date: 2011-03-11 03:46:47
Message-ID: AANLkTin0W4Kci2aD1oWUAkMi+Eey85MC2BPjxogWsqsU@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Thu, Mar 10, 2011 at 10:36 PM, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
> Robert Haas wrote:
>> Back in 2006, we have this commit:
>>
>> commit 2b25e1169f44368c120931787628d51731b5cc8c
>> Author: Peter Eisentraut <peter_e(at)gmx(dot)net>
>> Date:   Sat Oct 7 20:59:05 2006 +0000
>>
>>     The -X option in pg_dump was supposed to be a workaround for the lack of
>>     portable long options.  But we have had portable long options for a long
>>     time now, so this is obsolete.  Now people have added options which *only*
>>     work with -X but not as regular long option, so I'm putting a stop to this:
>>     -X is deprecated; it still works, but it has been removed from the
>>     documentation, and please don't add more of them.
>>
>> Since then, two additional -X options have crept in, doubtless due to
>> mimicry of the existing options without examination of the commit
>> logs.  I think we should either (a) remove the -X option altogether or
>> (b) change the comment so that it clearly states the same message that
>> appears here in the commit log, namely, that no new -X options are to
>> be created.  The existing comment says that -X is deprecated, but that
>> doesn't make it entirely 100% clear that the code isn't intended to be
>> further updated, at least judging by the results.
>
> Code comment added with attached, applied patch.

At a minimum, we should probably also remove -X no-security-label and
-X no-unlogged-table-data, which don't exist in any released versions
(unless you want to count alphas). But considering that this has been
deprecated and undocumented since 8.2, I think it might be time to
pull the plug on -X altogether.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: pg_dump -X
Date: 2011-03-11 03:59:03
Message-ID: 201103110359.p2B3x3v20380@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Robert Haas wrote:
> On Thu, Mar 10, 2011 at 10:36 PM, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
> > Robert Haas wrote:
> >> Back in 2006, we have this commit:
> >>
> >> commit 2b25e1169f44368c120931787628d51731b5cc8c
> >> Author: Peter Eisentraut <peter_e(at)gmx(dot)net>
> >> Date: ? Sat Oct 7 20:59:05 2006 +0000
> >>
> >> ? ? The -X option in pg_dump was supposed to be a workaround for the lack of
> >> ? ? portable long options. ?But we have had portable long options for a long
> >> ? ? time now, so this is obsolete. ?Now people have added options which *only*
> >> ? ? work with -X but not as regular long option, so I'm putting a stop to this:
> >> ? ? -X is deprecated; it still works, but it has been removed from the
> >> ? ? documentation, and please don't add more of them.
> >>
> >> Since then, two additional -X options have crept in, doubtless due to
> >> mimicry of the existing options without examination of the commit
> >> logs. ?I think we should either (a) remove the -X option altogether or
> >> (b) change the comment so that it clearly states the same message that
> >> appears here in the commit log, namely, that no new -X options are to
> >> be created. ?The existing comment says that -X is deprecated, but that
> >> doesn't make it entirely 100% clear that the code isn't intended to be
> >> further updated, at least judging by the results.
> >
> > Code comment added with attached, applied patch.
>
> At a minimum, we should probably also remove -X no-security-label and
> -X no-unlogged-table-data, which don't exist in any released versions
> (unless you want to count alphas). But considering that this has been
> deprecated and undocumented since 8.2, I think it might be time to
> pull the plug on -X altogether.

I remove the new -X options with the attached, applied patch. The
existing options are not really costing us anything except a few lines
of code.

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

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

Attachment Content-Type Size
/rtmp/pg_dump2.diff text/x-diff 608 bytes

From: David Fetter <david(at)fetter(dot)org>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: pg_dump -X
Date: 2011-03-12 00:14:24
Message-ID: 20110312001424.GF31880@fetter.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Thu, Mar 10, 2011 at 10:46:47PM -0500, Robert Haas wrote:
> On Thu, Mar 10, 2011 at 10:36 PM, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
> > Robert Haas wrote:
> >> Back in 2006, we have this commit:
> >>
> >> commit 2b25e1169f44368c120931787628d51731b5cc8c
> >> Author: Peter Eisentraut <peter_e(at)gmx(dot)net>
> >> Date:   Sat Oct 7 20:59:05 2006 +0000
> >>
> >>     The -X option in pg_dump was supposed to be a workaround for the lack of
> >>     portable long options.  But we have had portable long options for a long
> >>     time now, so this is obsolete.  Now people have added options which *only*
> >>     work with -X but not as regular long option, so I'm putting a stop to this:
> >>     -X is deprecated; it still works, but it has been removed from the
> >>     documentation, and please don't add more of them.
> >>
> >> Since then, two additional -X options have crept in, doubtless due to
> >> mimicry of the existing options without examination of the commit
> >> logs.  I think we should either (a) remove the -X option altogether or
> >> (b) change the comment so that it clearly states the same message that
> >> appears here in the commit log, namely, that no new -X options are to
> >> be created.  The existing comment says that -X is deprecated, but that
> >> doesn't make it entirely 100% clear that the code isn't intended to be
> >> further updated, at least judging by the results.
> >
> > Code comment added with attached, applied patch.
>
> At a minimum, we should probably also remove -X no-security-label and
> -X no-unlogged-table-data, which don't exist in any released versions
> (unless you want to count alphas). But considering that this has been
> deprecated and undocumented since 8.2, I think it might be time to
> pull the plug on -X altogether.

+1 for pulling this plug :)

Cheers,
David.
--
David Fetter <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
Skype: davidfetter XMPP: david(dot)fetter(at)gmail(dot)com
iCal: webcal://www.tripit.com/feed/ical/people/david74/tripit.ics

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate


From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_dump -X
Date: 2011-03-12 01:37:41
Message-ID: 1299893819-sup-7062@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Excerpts from Bruce Momjian's message of vie mar 11 00:59:03 -0300 2011:

> > At a minimum, we should probably also remove -X no-security-label and
> > -X no-unlogged-table-data, which don't exist in any released versions
> > (unless you want to count alphas). But considering that this has been
> > deprecated and undocumented since 8.2, I think it might be time to
> > pull the plug on -X altogether.
>
> I remove the new -X options with the attached, applied patch. The
> existing options are not really costing us anything except a few lines
> of code.

Given that, it seems pretty pointless to remove support for -X options
that have existed for years.

--
Álvaro Herrera <alvherre(at)commandprompt(dot)com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_dump -X
Date: 2011-03-12 03:36:07
Message-ID: 201103120336.p2C3a7O00270@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Alvaro Herrera wrote:
> Excerpts from Bruce Momjian's message of vie mar 11 00:59:03 -0300 2011:
>
> > > At a minimum, we should probably also remove -X no-security-label and
> > > -X no-unlogged-table-data, which don't exist in any released versions
> > > (unless you want to count alphas). But considering that this has been
> > > deprecated and undocumented since 8.2, I think it might be time to
> > > pull the plug on -X altogether.
> >
> > I remove the new -X options with the attached, applied patch. The
> > existing options are not really costing us anything except a few lines
> > of code.
>
> Given that, it seems pretty pointless to remove support for -X options
> that have existed for years.

I agree. They are not documented and only are a few C lines.

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

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


From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Alvaro Herrera <alvherre(at)commandprompt(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_dump -X
Date: 2011-03-12 05:19:04
Message-ID: AANLkTik9LS+=0krpGZnDazLri7QzmFE9rOKTtAFaDovk@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Fri, Mar 11, 2011 at 10:36 PM, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
> Alvaro Herrera wrote:
>> Excerpts from Bruce Momjian's message of vie mar 11 00:59:03 -0300 2011:
>>
>> > > At a minimum, we should probably also remove -X no-security-label and
>> > > -X no-unlogged-table-data, which don't exist in any released versions
>> > > (unless you want to count alphas).  But considering that this has been
>> > > deprecated and undocumented since 8.2, I think it might be time to
>> > > pull the plug on -X altogether.
>> >
>> > I remove the new -X options with the attached, applied patch.  The
>> > existing options are not really costing us anything except a few lines
>> > of code.
>>
>> Given that, it seems pretty pointless to remove support for -X options
>> that have existed for years.
>
> I agree.  They are not documented and only are a few C lines.

Presumably the point of deprecating the feature is that we'd
eventually remove it. If 4 major releases isn't long enough, what is?

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Alvaro Herrera <alvherre(at)commandprompt(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_dump -X
Date: 2011-03-12 05:56:44
Message-ID: 201103120556.p2C5uiT20431@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Robert Haas wrote:
> On Fri, Mar 11, 2011 at 10:36 PM, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
> > Alvaro Herrera wrote:
> >> Excerpts from Bruce Momjian's message of vie mar 11 00:59:03 -0300 2011:
> >>
> >> > > At a minimum, we should probably also remove -X no-security-label and
> >> > > -X no-unlogged-table-data, which don't exist in any released versions
> >> > > (unless you want to count alphas). ?But considering that this has been
> >> > > deprecated and undocumented since 8.2, I think it might be time to
> >> > > pull the plug on -X altogether.
> >> >
> >> > I remove the new -X options with the attached, applied patch. ?The
> >> > existing options are not really costing us anything except a few lines
> >> > of code.
> >>
> >> Given that, it seems pretty pointless to remove support for -X options
> >> that have existed for years.
> >
> > I agree. ?They are not documented and only are a few C lines.
>
> Presumably the point of deprecating the feature is that we'd
> eventually remove it. If 4 major releases isn't long enough, what is?

Good point.

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

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


From: "Aaron W(dot) Swenson" <aaron(dot)w(dot)swenson(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: pg_dump -X
Date: 2011-03-12 23:05:42
Message-ID: 4D7BFC46.30206@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On 12/24/2010 02:32 AM, J. Roeleveld wrote:
>
> Also, unless Gentoo actually strips the man-page and "--help" page (which I do
> seriously doubt), I do not see the "-X" option in the documentation.
>
> --
> Joost
>

Delayed response: No, we don't strip the documentation. It is simply
'unfooled' around with.

- - Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iF4EAREIAAYFAk17/EYACgkQCOhwUhu5AEl0RwD/akhtWUK2FFbM4Vbg4cySN8PI
9f0seIhVO9+pZPmEC2cA/2f3FqsFlOrzp9rjZPkmCP4i3B1g8UOZlCvmcUq2PXX3
=Z4O9
-----END PGP SIGNATURE-----


From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Alvaro Herrera <alvherre(at)commandprompt(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_dump -X
Date: 2011-03-14 13:56:22
Message-ID: AANLkTimXnA_sP_thuocHTfQn_U4evKZpr5ugovreTTmN@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Sat, Mar 12, 2011 at 12:56 AM, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
>> Presumably the point of deprecating the feature is that we'd
>> eventually remove it.  If 4 major releases isn't long enough, what is?
>
> Good point.

Unless there are further objections, I think we should go ahead and remove this.

If there ARE further objections, then please say what release you
think it would be OK to remove it in, or why you think it's worth
keeping around indefinitely given that the last version in which it
was documented is now EOL.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Alvaro Herrera <alvherre(at)commandprompt(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_dump -X
Date: 2011-03-18 13:46:38
Message-ID: AANLkTimionrBcW2WSF+jEnvKwozOL4cceiRUOxaiQ5Nv@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Mon, Mar 14, 2011 at 9:56 AM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> On Sat, Mar 12, 2011 at 12:56 AM, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
>>> Presumably the point of deprecating the feature is that we'd
>>> eventually remove it.  If 4 major releases isn't long enough, what is?
>>
>> Good point.
>
> Unless there are further objections, I think we should go ahead and remove this.
>
> If there ARE further objections, then please say what release you
> think it would be OK to remove it in, or why you think it's worth
> keeping around indefinitely given that the last version in which it
> was documented is now EOL.

Hearing no further objections, I have removed this code.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company