Re: guc.c and postgresql.conf.sample constistency checker

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: snyder(at)roguewave(dot)com
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: guc.c and postgresql.conf.sample constistency checker
Date: 2002-06-14 04:50:52
Message-ID: 200206140450.g5E4oqZ01177@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches


Your patch has been added to the PostgreSQL unapplied patches list at:

http://candle.pha.pa.us/cgi-bin/pgpatches

I will try to apply it within the next 48 hours.

---------------------------------------------------------------------------

snyder(at)roguewave(dot)com wrote:
> This is a small script to check that guc.c and postgresql.conf.sample
> are fairly representative of each other, and the output that I'm getting
> against the most recent cvs.
>
> The fix for debug_level is easy enough (I know it was removed from guc.c),
> but I don't know enough about the rest of the items to be able to document
> them in the postgresql.conf.sample well.
>
> output:
> debug_level seems to be missing from guc.c
> fixbtree seems to be missing from postgresql.conf.sample
> pre_auth_delay seems to be missing from postgresql.conf.sample
> lc_messages seems to be missing from postgresql.conf.sample
> lc_monetary seems to be missing from postgresql.conf.sample
> lc_numeric seems to be missing from postgresql.conf.sample
> lc_time seems to be missing from postgresql.conf.sample
> server_encoding seems to be missing from postgresql.conf.sample
> session_authorization seems to be missing from postgresql.conf.sample
>
> I believe this script should live in src/tools
> #!/bin/sh
>
> ## currently, this script makes a lot of assumptions:
> ## 1) location of guc.c and postgresql.conf.sample relative to src/tools
> ## For postgresql.conf.sample
> ## 2) the valid config settings may be preceded by a '#', but NOT '# '
> ## 3) the valid config settings will be followed immediately by ' ='
> ## (at least one space preceding the '='
> ## For guc.c
> ## 4) the options have PGC_ on the same line as the option
> ## 5) the options have '{ ' on the same line as the option
>
> ## Problems
> ## 1) Don't know what to do with TRANSACTION ISOLATION LEVEL (in guc.c)
>
> PATH_TO_GUC="`dirname $0`/../backend/utils/misc"
>
> SETTINGS=`grep ' =' $PATH_TO_GUC/postgresql.conf.sample | grep -v '^# ' | sed -e 's,^#,,' | awk '{print $1}'`
> for i in $SETTINGS ; do
> grep -i $i $PATH_TO_GUC/guc.c > /dev/null;
> if [ ! $? = 0 ] ; then
> echo "$i seems to be missing from guc.c";
> fi;
> done
>
> SETTINGS=`grep '{ .*PGC_' $PATH_TO_GUC/guc.c | awk '{print $2}' | sed -e 's,",,g' -e 's/,//'`
> for i in $SETTINGS ; do
> grep -i $i $PATH_TO_GUC/postgresql.conf.sample > /dev/null;
> if [ ! $? = 0 ] ; then
> echo "$i seems to be missing from postgresql.conf.sample";
> fi;
> done
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly
>

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2002-06-14 04:52:10 Re: Bug#146689: [BUGS] [Fwd: Bug#146689: postgresql-client: 'GRANT DELETE'
Previous Message Bruce Momjian 2002-06-14 04:49:26 Re: macaddr format fix