Re: postgres --help-config

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: postgres --help-config
Дата
Msg-id 200310151300.h9FD0bi10060@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: postgres --help-config  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: postgres --help-config  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: postgres --help-config  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Tom Lane wrote:
> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > ... Will Red Hat be upset if we
> > leave it unchanged for 7.4.X and rip this out and redo it in 7.5?
> 
> It'd be better if we could get it right the first time, with the
> understanding that the output format is not very negotiable at this
> late hour.  But as best I can tell, most of the unhappiness is with the
> design of the switch set, which is not something I want to defend in
> detail.  There's a lot there that isn't needed for the RHDB tool as I
> understand it, and I think that altering the switches used to get the
> output that the tool does need would still be a feasible change from the
> tool's point of view.
> 
> I would be in favor of simplifying the supported switch set to the
> minimum needed by Red Hat's tool (the equivalent of -G -M if I
> understood Fernando correctly), and re-adding complexity in future
> when and if it's shown to be needed.  But we need to make a decision
> about this now.  Preferably yesterday.

I understand we want to get something that _isn't_ going to change after
7.4.  That's why I proposed a simple --help-config in user-readable
format (might be improved in the future), and a --help-config-raw in tab
format, without headers.  Seems the tool can use the tab format to do
whatever it wants, including loading it into a C structure and running
the existing help_config.c code over it.   I also can't imagine the raw
format every changing, because of course, it is "raw".  I think everyone
agrees we need a user-readable and machine-readable output for this.  As
I mentioned earlier, SRA has a tool that does this too, so it must be a
pretty common need.

My guess is that every tool is going to want to get at the data in a
different way, so we are better off just passing the data in a neutral
format and letting the tool manipulate the data, rather than trying to
guess what features the tool will need.

One thing that seems very strange about the current API are flags that
have meaning only when --help-config becomes before it, as with -G and
-M.  I have never seen that before, and I don't know how we would even
document that.  We do have pg_ctl that has different flags for different
modes, but a word is required at the beginning, not a flag.

I guess iff someone needs raw with headers in the future, I guess we
could add --help-config-raw-headers.

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073
 


В списке pgsql-hackers по дате отправления:

Предыдущее
От: James Rogers
Дата:
Сообщение: Re: Database Kernels and O_DIRECT
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: postgres --help-config