Обсуждение: pg_dump -X
Back in 2006, we have this commit: commit 2b25e1169f44368c120931787628d51731b5cc8c Author: Peter Eisentraut <peter_e@gmx.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 portablelong 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 beenremoved 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
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@gmx.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
Robert Haas wrote: > 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 Yeah, Dan recently implemented the DEFERRABLE transaction behavior which was discussed on the list, so I added a --serializable-deferrable long option to pg_dump in my repo, and I had to look at that comment and the the current -X usage for several minutes before I decided I shouldn't also add a corresponding -X option -- and even then I wasn't feeling entirely sure about it. My first recommendation would be to rip it out, but a more explicit comment would have saved me that time. -Kevin
On Thu, Mar 10, 2011 at 10:36 PM, Bruce Momjian <bruce@momjian.us> wrote: > Robert Haas wrote: >> Back in 2006, we have this commit: >> >> commit 2b25e1169f44368c120931787628d51731b5cc8c >> Author: Peter Eisentraut <peter_e@gmx.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
Robert Haas wrote: > Back in 2006, we have this commit: > > commit 2b25e1169f44368c120931787628d51731b5cc8c > Author: Peter Eisentraut <peter_e@gmx.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@momjian.us> http://momjian.us EnterpriseDB http://enterprisedb.com + It's impossible for everything to be true. + diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c new file mode 100644 index 0884517..feeeae8 *** a/src/bin/pg_dump/pg_dump.c --- b/src/bin/pg_dump/pg_dump.c *************** main(int argc, char **argv) *** 469,475 **** break; case 'X': ! /* -X is a deprecated alternative to long options */ if (strcmp(optarg, "disable-dollar-quoting") == 0) disable_dollar_quoting = 1; else if (strcmp(optarg, "disable-triggers") == 0) --- 469,478 ---- break; case 'X': ! /* ! * -X is a deprecated alternative to long options; ! * no new -X options are to be added. ! */ if (strcmp(optarg, "disable-dollar-quoting") == 0) disable_dollar_quoting = 1; else if (strcmp(optarg, "disable-triggers") == 0)
Robert Haas wrote: > On Thu, Mar 10, 2011 at 10:36 PM, Bruce Momjian <bruce@momjian.us> wrote: > > Robert Haas wrote: > >> Back in 2006, we have this commit: > >> > >> commit 2b25e1169f44368c120931787628d51731b5cc8c > >> Author: Peter Eisentraut <peter_e@gmx.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@momjian.us> http://momjian.us EnterpriseDB http://enterprisedb.com + It's impossible for everything to be true. + diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c new file mode 100644 index feeeae8..546a04c *** a/src/bin/pg_dump/pg_dump.c --- b/src/bin/pg_dump/pg_dump.c *************** main(int argc, char **argv) *** 481,490 **** outputNoTablespaces = 1; else if (strcmp(optarg, "use-set-session-authorization") == 0) use_setsessauth = 1; - else if (strcmp(optarg, "no-security-label") == 0) - no_security_label = 1; - else if (strcmp(optarg, "no-unlogged-table-data") == 0) - no_unlogged_table_data = 1; else { fprintf(stderr, --- 481,486 ----
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@momjian.us> wrote: > > Robert Haas wrote: > >> Back in 2006, we have this commit: > >> > >> commit 2b25e1169f44368c120931787628d51731b5cc8c > >> Author: Peter Eisentraut <peter_e@gmx.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@fetter.org> http://fetter.org/ Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter Skype: davidfetter XMPP: david.fetter@gmail.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
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@commandprompt.com> The PostgreSQL Company - Command Prompt, Inc. PostgreSQL Replication, Consulting, Custom Development, 24x7 support
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@momjian.us> http://momjian.us EnterpriseDB http://enterprisedb.com + It's impossible for everything to be true. +
On Fri, Mar 11, 2011 at 10:36 PM, Bruce Momjian <bruce@momjian.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
Robert Haas wrote: > On Fri, Mar 11, 2011 at 10:36 PM, Bruce Momjian <bruce@momjian.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@momjian.us> http://momjian.us EnterpriseDB http://enterprisedb.com + It's impossible for everything to be true. +
-----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-----
On Sat, Mar 12, 2011 at 12:56 AM, Bruce Momjian <bruce@momjian.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
On Mon, Mar 14, 2011 at 9:56 AM, Robert Haas <robertmhaas@gmail.com> wrote: > On Sat, Mar 12, 2011 at 12:56 AM, Bruce Momjian <bruce@momjian.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