Skip site navigation (1) Skip section navigation (2)

Re: Removing postgres -f command line option

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Removing postgres -f command line option
Date: 2011-11-17 09:19:20
Message-ID: 4EC4D198.6080100@enterprisedb.com (view raw)
While looking at Shigeru Hanada's foreign join pushdown patch, I noticed 
a command line option that I didn't know to exist:

$ postgres --help
...
Developer options:
   -f s|i|n|m|h    forbid use of some plan types

That doesn't include all the options we support, the documentation 
lists: s|i|o|b|t|n|m|h. These are aliases for enable_* planner options, 
e.g -fs is equal to enable_seqscan=off.

That seems completely useless to me, because you can also do "-c 
enable_seqscan=off". Any objections to removing the -f option altogether?

-- 
   Heikki Linnakangas
   EnterpriseDB   http://www.enterprisedb.com

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Removing postgres -f command line option
Date: 2011-11-17 13:14:21
Message-ID: CA+TgmoZXrmTjzRs7CNcGngXu7T5tFeNbuZrh3Bi-8r+8Y8=b=g@mail.gmail.com (view raw)
On Thu, Nov 17, 2011 at 4:19 AM, Heikki Linnakangas
<heikki(dot)linnakangas(at)enterprisedb(dot)com> wrote:
> While looking at Shigeru Hanada's foreign join pushdown patch, I noticed a
> command line option that I didn't know to exist:
>
> $ postgres --help
> ...
> Developer options:
>  -f s|i|n|m|h    forbid use of some plan types
>
> That doesn't include all the options we support, the documentation lists:
> s|i|o|b|t|n|m|h. These are aliases for enable_* planner options, e.g -fs is
> equal to enable_seqscan=off.
>
> That seems completely useless to me, because you can also do "-c
> enable_seqscan=off". Any objections to removing the -f option altogether?

No.  Seems useless to me.

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

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Removing postgres -f command line option
Date: 2011-11-17 13:28:20
Message-ID: 1321536266-sup-5583@alvh.no-ip.org (view raw)
Excerpts from Robert Haas's message of jue nov 17 10:14:21 -0300 2011:
> On Thu, Nov 17, 2011 at 4:19 AM, Heikki Linnakangas
> <heikki(dot)linnakangas(at)enterprisedb(dot)com> wrote:
> > While looking at Shigeru Hanada's foreign join pushdown patch, I noticed a
> > command line option that I didn't know to exist:
> >
> > $ postgres --help
> > ...
> > Developer options:
> >  -f s|i|n|m|h    forbid use of some plan types
> >
> > That doesn't include all the options we support, the documentation lists:
> > s|i|o|b|t|n|m|h. These are aliases for enable_* planner options, e.g -fs is
> > equal to enable_seqscan=off.
> >
> > That seems completely useless to me, because you can also do "-c
> > enable_seqscan=off". Any objections to removing the -f option altogether?
> 
> No.  Seems useless to me.

Dunno.  It seems awfully convenient if you're testing optimizer stuff
that requires turning one of these off, though of course I haven't ever
done that.  The alternative requires a lot more keystrokes.  It doesn't
matter to me either way, though.  (To be honest I wasn't aware of these
options -- not sure if I'll use them in the future)

$ PGOPTIONS=-fs psql
psql (9.2devel)
Digite «help» para obtener ayuda.

alvherre=# show enable_seqscan ;
 enable_seqscan 
----------------
 off
(1 fila)


$ PGOPTIONS="-c enable_seqscan=0" psql
psql (9.2devel)
Digite «help» para obtener ayuda.

alvherre=# show enable_seqscan ;
 enable_seqscan 
----------------
 off
(1 fila)

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

From: Susanne Ebrecht <susanne(at)2ndQuadrant(dot)com>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: Removing postgres -f command line option
Date: 2011-11-17 15:11:57
Message-ID: 4EC5243D.9000401@2ndQuadrant.com (view raw)
Heikki,

On 17.11.2011 10:19, Heikki Linnakangas wrote:
> $ postgres --help
> ...
> Developer options:
>   -f s|i|n|m|h    forbid use of some plan types
>
> That doesn't include all the options we support, the documentation 
> lists: s|i|o|b|t|n|m|h. These are aliases for enable_* planner 
> options, e.g -fs is equal to enable_seqscan=off.
>
> That seems completely useless to me, because you can also do "-c 
> enable_seqscan=off". Any objections to removing the -f option altogether?
>

I knew about it. But - I never needed it and I always scroll over it 
when I show --help in my trainings.

When I was young - some when in last century - I learned that you never 
should remove a feature without pre-announcing it as deprecated.

I think it is better to mark it deprecated in 9.2 and totally remove it 
in 9.3.

Susanne

-- 
Susanne Ebrecht - 2ndQuadrant
PostgreSQL Development, 24x7 Support, Training and Services
www.2ndQuadrant.com


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Removing postgres -f command line option
Date: 2011-11-17 15:56:36
Message-ID: 12532.1321545396@sss.pgh.pa.us (view raw)
Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> writes:
> While looking at Shigeru Hanada's foreign join pushdown patch, I noticed 
> a command line option that I didn't know to exist:

> $ postgres --help
> ...
> Developer options:
>    -f s|i|n|m|h    forbid use of some plan types

Hmm, I thought I'd fixed that help message to match reality recently.

> That seems completely useless to me, because you can also do "-c 
> enable_seqscan=off". Any objections to removing the -f option altogether?

I use it.  See also src/test/regress/regressplans.sh, which would become
greatly less wieldy if it had to spell out the switches long-form.

			regards, tom lane

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Removing postgres -f command line option
Date: 2011-11-21 18:27:24
Message-ID: 201111211827.pALIROQ28536@momjian.us (view raw)
Tom Lane wrote:
> Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> writes:
> > While looking at Shigeru Hanada's foreign join pushdown patch, I noticed 
> > a command line option that I didn't know to exist:
> 
> > $ postgres --help
> > ...
> > Developer options:
> >    -f s|i|n|m|h    forbid use of some plan types
> 
> Hmm, I thought I'd fixed that help message to match reality recently.
> 
> > That seems completely useless to me, because you can also do "-c 
> > enable_seqscan=off". Any objections to removing the -f option altogether?
> 
> I use it.  See also src/test/regress/regressplans.sh, which would become
> greatly less wieldy if it had to spell out the switches long-form.

I think it is hard to argue that such a  user-visible flag is
reasonable, even if it helps backend developers avoid some keystrokes.

I think flags used only by backend developers should be things that can
_only_ be done with flags.

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

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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Removing postgres -f command line option
Date: 2011-11-22 02:24:38
Message-ID: 29618.1321928678@sss.pgh.pa.us (view raw)
Bruce Momjian <bruce(at)momjian(dot)us> writes:
> I think it is hard to argue that such a  user-visible flag is
> reasonable, even if it helps backend developers avoid some keystrokes.

> I think flags used only by backend developers should be things that can
> _only_ be done with flags.

Huh?  By that argument, we should remove every single postmaster command
line switch except "-c var=value", because all the other ones are
shorthands for that --- Peter went to some lengths awhile ago to make
that true.

			regards, tom lane

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Removing postgres -f command line option
Date: 2011-11-22 02:41:53
Message-ID: 201111220241.pAM2frS21286@momjian.us (view raw)
Tom Lane wrote:
> Bruce Momjian <bruce(at)momjian(dot)us> writes:
> > I think it is hard to argue that such a  user-visible flag is
> > reasonable, even if it helps backend developers avoid some keystrokes.
> 
> > I think flags used only by backend developers should be things that can
> > _only_ be done with flags.
> 
> Huh?  By that argument, we should remove every single postmaster command
> line switch except "-c var=value", because all the other ones are
> shorthands for that --- Peter went to some lengths awhile ago to make
> that true.

I was talking about developer-use-only flags.

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

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


Privacy Policy | About PostgreSQL
Copyright © 1996-2013 The PostgreSQL Global Development Group