Thread: Removing postgres -f command line option

Removing postgres -f command line option

From
Heikki Linnakangas
Date:
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


Re: Removing postgres -f command line option

From
Robert Haas
Date:
On Thu, Nov 17, 2011 at 4:19 AM, Heikki Linnakangas
<heikki.linnakangas@enterprisedb.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


Re: Removing postgres -f command line option

From
Alvaro Herrera
Date:
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.linnakangas@enterprisedb.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@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


Re: Removing postgres -f command line option

From
Susanne Ebrecht
Date:
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



Re: Removing postgres -f command line option

From
Tom Lane
Date:
Heikki Linnakangas <heikki.linnakangas@enterprisedb.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


Re: Removing postgres -f command line option

From
Bruce Momjian
Date:
Tom Lane wrote:
> Heikki Linnakangas <heikki.linnakangas@enterprisedb.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@momjian.us>        http://momjian.us EnterpriseDB
http://enterprisedb.com
 + It's impossible for everything to be true. +


Re: Removing postgres -f command line option

From
Tom Lane
Date:
Bruce Momjian <bruce@momjian.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


Re: Removing postgres -f command line option

From
Bruce Momjian
Date:
Tom Lane wrote:
> Bruce Momjian <bruce@momjian.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@momjian.us>        http://momjian.us EnterpriseDB
http://enterprisedb.com
 + It's impossible for everything to be true. +