Обсуждение: Ordering in guc.c vs. config.sgml vs. postgresql.sample.conf

Поиск
Список
Период
Сортировка

Ordering in guc.c vs. config.sgml vs. postgresql.sample.conf

От
Andres Freund
Дата:
Hi,

While working on
http://www.postgresql.org/message-id/CABUevEzwMa9y+Bp4Fi4fE4hmPfZMjOZOmuLVtbHhPWtcujrmLg@mail.gmail.com
I once more taken aback by the total lack of consistency between the
three files in $subject. Some of the inconsistency of guc.c vs. the rest
comes from having separate lists for different datatypes - hard to avoid
- but even disregarding that, there seems to be little to no
consistency.

How about we try to order them the same? That's obviously not a 9.6
topic at this point, but it'd probably be good to that early in 9.7.

- Andres



Re: Ordering in guc.c vs. config.sgml vs. postgresql.sample.conf

От
Fujii Masao
Дата:
On Mon, Apr 25, 2016 at 3:58 AM, Andres Freund <andres@anarazel.de> wrote:
> Hi,
>
> While working on
> http://www.postgresql.org/message-id/CABUevEzwMa9y+Bp4Fi4fE4hmPfZMjOZOmuLVtbHhPWtcujrmLg@mail.gmail.com
> I once more taken aback by the total lack of consistency between the
> three files in $subject. Some of the inconsistency of guc.c vs. the rest
> comes from having separate lists for different datatypes - hard to avoid
> - but even disregarding that, there seems to be little to no
> consistency.
>
> How about we try to order them the same?

+1, especially for the ordering in config.sgml vs. postgresql.conf.sample
because that consistency makes it easy for users to use them.

Regards,

-- 
Fujii Masao



Re: Ordering in guc.c vs. config.sgml vs. postgresql.sample.conf

От
Magnus Hagander
Дата:


On Sun, Apr 24, 2016 at 8:58 PM, Andres Freund <andres@anarazel.de> wrote:
Hi,

While working on
http://www.postgresql.org/message-id/CABUevEzwMa9y+Bp4Fi4fE4hmPfZMjOZOmuLVtbHhPWtcujrmLg@mail.gmail.com
I once more taken aback by the total lack of consistency between the
three files in $subject. Some of the inconsistency of guc.c vs. the rest
comes from having separate lists for different datatypes - hard to avoid
- but even disregarding that, there seems to be little to no
consistency.

How about we try to order them the same? That's obviously not a 9.6
topic at this point, but it'd probably be good to that early in 9.7.

Agreed, at least between the documentation and postgresql.conf.sample. That's also the order that users are likely to look at.

guc.c might be better to just stick to alphabetical per group. (Which we also don't do today, of course, but it could be a better way to do it there) 


--

Re: Ordering in guc.c vs. config.sgml vs. postgresql.sample.conf

От
Alexander Korotkov
Дата:
On Sun, Apr 24, 2016 at 9:58 PM, Andres Freund <andres@anarazel.de> wrote:
While working on
http://www.postgresql.org/message-id/CABUevEzwMa9y+Bp4Fi4fE4hmPfZMjOZOmuLVtbHhPWtcujrmLg@mail.gmail.com
I once more taken aback by the total lack of consistency between the
three files in $subject. Some of the inconsistency of guc.c vs. the rest
comes from having separate lists for different datatypes - hard to avoid
- but even disregarding that, there seems to be little to no
consistency.

How about we try to order them the same? That's obviously not a 9.6
topic at this point, but it'd probably be good to that early in 9.7.

+1

Also, what do you think about validation script which checks consistency between them?

------
Alexander Korotkov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company

Re: Ordering in guc.c vs. config.sgml vs. postgresql.sample.conf

От
Robert Haas
Дата:
On Mon, Apr 25, 2016 at 6:29 AM, Magnus Hagander <magnus@hagander.net> wrote:
> guc.c might be better to just stick to alphabetical per group. (Which we
> also don't do today, of course, but it could be a better way to do it there)

For myself, I would rather have guc.c in the order that it's in.
Related options tend to be next to each other, and being able to look
up and down to see that they are all consistent has value for me.  If
we put them in alphabetical order, that's likely to be less true.  And
realistically, anybody who is looking for a particular setting is just
going to ask their editor to find it for them, so there's not a lot of
value in alpha order that I can see.

However, if I lose this argument, I will not cry into my beer.  Just
throwing out my $0.02.

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



Re: Ordering in guc.c vs. config.sgml vs. postgresql.sample.conf

От
Peter Geoghegan
Дата:
On Mon, Apr 25, 2016 at 9:57 AM, Robert Haas <robertmhaas@gmail.com> wrote:
> For myself, I would rather have guc.c in the order that it's in.
> Related options tend to be next to each other, and being able to look
> up and down to see that they are all consistent has value for me.

+1

The GUC autovacuum_work_mem is beside other autovacuum GUCs, not other
RESOURCES_MEM GUCs. track_activity_query_size is beside GUCs that
relate to logging, and yet is also a RESOURCES_MEM GUC. So, neither of
these GUCs would be better placed beside the things that we think of
as RESOURCES_MEM GUCs, such as work_mem. In short, the existing
ordering isn't really so arbitrary.

-- 
Peter Geoghegan