3 ## currently, this script makes a lot of assumptions:
4 ## in postgresql.conf.sample:
5 ## 1) the valid config settings may be preceded by a '#', but NOT '# '
6 ## (we use this to skip comments)
7 ## 2) the valid config settings will be followed immediately by ' ='
8 ## (at least one space preceding the '=')
10 ## 3) the options have PGC_ on the same line as the option
11 ## 4) the options have '{' on the same line as the option
14 ## 1) Don't know what to do with TRANSACTION ISOLATION LEVEL
16 ## if an option is valid but shows up in only one file (guc.c but not
17 ## postgresql.conf.sample), it should be listed here so that it
19 INTENTIONALLY_NOT_INCLUDED="autocommit debug_deadlocks exit_on_error \
20 is_superuser lc_collate lc_ctype lc_messages lc_monetary lc_numeric lc_time \
21 pre_auth_delay role seed server_encoding server_version session_authorization \
22 trace_lock_oidmin trace_lock_table trace_locks trace_lwlocks trace_notify \
23 trace_userlocks transaction_isolation transaction_read_only \
26 ### What options are listed in postgresql.conf.sample, but don't appear
29 # grab everything that looks like a setting and convert it to lower case
30 SETTINGS=`grep ' =' postgresql.conf.sample |
31 grep -v '^# ' | # strip comments
35 SETTINGS=`echo "$SETTINGS" | tr 'A-Z' 'a-z'`
37 for i in $SETTINGS ; do
39 ## it sure would be nice to replace this with an sql "not in" statement
40 ## it doesn't seem to make sense to have things in .sample and not in guc.c
41 # for hidethis in $INTENTIONALLY_NOT_INCLUDED ; do
42 # if [ "$hidethis" = "$i" ] ; then
46 if [ "$hidden" -eq 0 ] ; then
47 grep -i '"'$i'"' guc.c > /dev/null
48 if [ $? -ne 0 ] ; then
49 echo "$i seems to be missing from guc.c";
54 ### What options are listed in guc.c, but don't appear
55 ### in postgresql.conf.sample?
57 # grab everything that looks like a setting and convert it to lower case
59 SETTINGS=`grep '{.* PGC_' guc.c | awk '{print $1}' | \
60 sed -e 's/{//g' -e 's/"//g' -e 's/,//'`
62 SETTINGS=`echo "$SETTINGS" | tr 'A-Z' 'a-z'`
64 for i in $SETTINGS ; do
66 ## it sure would be nice to replace this with an sql "not in" statement
67 for hidethis in $INTENTIONALLY_NOT_INCLUDED ; do
68 if [ "$hidethis" = "$i" ] ; then
72 if [ "$hidden" -eq 0 ] ; then
73 grep -i '#'$i' ' postgresql.conf.sample > /dev/null
74 if [ $? -ne 0 ] ; then
75 echo "$i seems to be missing from postgresql.conf.sample";