head	1.11;
access;
symbols
	REL9_0_0:1.10
	REL9_1_ALPHA1:1.11
	REL9_0_RC1:1.10
	REL9_0_BETA4:1.10
	REL9_0_STABLE:1.10.0.18
	REL9_0_BETA3:1.10
	REL9_0_BETA2:1.10
	REL7_4_29:1.8
	REL8_0_25:1.8
	REL8_1_21:1.9
	REL8_2_17:1.10
	REL8_3_11:1.10
	REL8_4_4:1.10
	REL9_0_BETA1:1.10
	REL9_0_ALPHA5_BRANCH:1.10.0.16
	REL9_0_ALPHA5:1.10
	REL7_4_28:1.8
	REL8_0_24:1.8
	REL8_1_20:1.9
	REL8_2_16:1.10
	REL8_3_10:1.10
	REL8_4_3:1.10
	REL9_0_ALPHA4:1.10
	REL9_0_ALPHA4_BRANCH:1.10.0.14
	REL8_5_ALPHA3:1.10
	REL8_5_ALPHA3_BRANCH:1.10.0.12
	REL7_4_27:1.8
	REL8_0_23:1.8
	REL8_1_19:1.9
	REL8_2_15:1.10
	REL8_3_9:1.10
	REL8_4_2:1.10
	REL8_5_ALPHA2:1.10
	REL8_5_ALPHA2_BRANCH:1.10.0.10
	REL7_4_26:1.8
	REL8_0_22:1.8
	REL8_1_18:1.9
	REL8_2_14:1.10
	REL8_3_8:1.10
	REL8_4_1:1.10
	REL8_5_ALPHA1:1.10
	REL8_5_ALPHA1_BRANCH:1.10.0.8
	REL8_4_STABLE:1.10.0.6
	REL8_4_0:1.10
	REL8_4_RC2:1.10
	REL8_4_RC1:1.10
	REL8_4_BETA2:1.10
	REL8_4_BETA1:1.10
	REL7_4_25:1.8
	REL8_0_21:1.8
	REL8_1_17:1.9
	REL8_2_13:1.10
	REL8_3_7:1.10
	REL7_4_24:1.8
	REL8_0_20:1.8
	REL8_1_16:1.9
	REL8_2_12:1.10
	REL8_3_6:1.10
	REL7_4_23:1.8
	REL8_0_19:1.8
	REL8_1_15:1.9
	REL8_2_11:1.10
	REL8_3_5:1.10
	REL7_4_22:1.8
	REL8_0_18:1.8
	REL8_1_14:1.9
	REL8_2_10:1.10
	REL8_3_4:1.10
	REL7_4_21:1.8
	REL8_0_17:1.8
	REL8_1_13:1.9
	REL8_2_9:1.10
	REL8_3_3:1.10
	REL7_4_20:1.8
	REL8_0_16:1.8
	REL8_1_12:1.9
	REL8_2_8:1.10
	REL8_3_2:1.10
	REL8_2_7:1.10
	REL8_3_1:1.10
	REL8_3_STABLE:1.10.0.4
	REL8_3_0:1.10
	REL8_3_RC2:1.10
	REL7_3_21:1.5
	REL7_4_19:1.8
	REL8_0_15:1.8
	REL8_1_11:1.9
	REL8_2_6:1.10
	REL8_3_RC1:1.10
	REL8_3_BETA4:1.10
	REL8_3_BETA3:1.10
	REL8_3_BETA2:1.10
	REL8_3_BETA1:1.10
	REL7_3_20:1.5
	REL7_4_18:1.8
	REL8_0_14:1.8
	REL8_1_10:1.9
	REL8_2_5:1.10
	REL7_3_19:1.5
	REL7_4_17:1.8
	REL8_0_13:1.8
	REL8_1_9:1.9
	REL8_2_4:1.10
	REL8_0_12:1.8
	REL8_1_8:1.9
	REL8_2_3:1.10
	REL7_3_18:1.5
	REL7_4_16:1.8
	REL8_0_11:1.8
	REL8_1_7:1.9
	REL8_2_2:1.10
	REL8_0_10:1.8
	REL8_1_6:1.9
	REL8_2_1:1.10
	REL7_4_15:1.8
	REL7_3_17:1.5
	REL8_2_STABLE:1.10.0.2
	REL8_2_0:1.10
	REL8_2_RC1:1.10
	REL8_2_BETA3:1.10
	REL8_2_BETA2:1.10
	REL8_1_5:1.9
	REL8_0_9:1.8
	REL7_4_14:1.8
	REL7_3_16:1.5
	REL8_2_BETA1:1.10
	REL7_3_15:1.5
	REL7_4_13:1.8
	REL8_0_8:1.8
	REL8_1_4:1.9
	REL7_3_14:1.5
	REL7_4_12:1.8
	REL8_0_7:1.8
	REL8_1_3:1.9
	REL7_3_13:1.5
	REL7_4_11:1.8
	REL8_0_6:1.8
	REL8_1_2:1.9
	REL7_3_12:1.5
	REL7_4_10:1.8
	REL8_0_5:1.8
	REL8_1_1:1.9
	REL8_1_STABLE:1.9.0.2
	REL8_1_0:1.9
	REL8_1_0RC1:1.9
	REL8_1_0BETA4:1.9
	REL8_1_0BETA3:1.9
	REL7_3_11:1.5
	REL7_4_9:1.8
	REL8_0_4:1.8
	REL8_1_0BETA2:1.9
	REL8_1_0BETA1:1.9
	REL7_3_10:1.5
	REL7_4_8:1.8
	REL8_0_3:1.8
	REL8_0_2:1.8
	REL7_3_9:1.5
	REL7_4_7:1.8
	REL8_0_1:1.8
	REL8_0_STABLE:1.8.0.8
	REL8_0_0:1.8.0.6
	REL8_0_0RC5:1.8
	REL8_0_0RC4:1.8
	REL8_0_0RC3:1.8
	REL8_0_0RC2:1.8
	REL8_0_0RC1:1.8
	REL8_0_0BETA5:1.8
	REL8_0_0BETA4:1.8
	REL7_4_6:1.8
	REL7_3_8:1.5
	REL8_0_0BETA3:1.8
	REL8_0_0BETA2:1.8
	REL7_4_5:1.8
	REL7_3_7:1.5
	REL7_4_4:1.8
	REL8_0_0BETA1:1.8
	REL7_4_3:1.8
	REL7_4_2:1.8
	REL7_3_6:1.5
	REL7_4_1:1.8
	REL7_3_5:1.5
	REL7_4:1.8
	REL7_4_RC2:1.8
	REL7_4_STABLE:1.8.0.4
	REL7_4_RC1:1.8
	REL7_4_BETA5:1.8
	REL7_4_BETA4:1.8
	REL7_4_BETA3:1.8
	REL7_4_BETA2:1.8
	WIN32_DEV:1.8.0.2
	REL7_4_BETA1:1.8
	REL7_3_4:1.5
	REL7_3_2:1.5
	REL7_3_STABLE:1.5.0.2;
locks; strict;
comment	@# @;


1.11
date	2010.07.20.00.47.53;	author rhaas;	state Exp;
branches;
next	1.10;

1.10
date	2006.09.02.13.12.50;	author momjian;	state Exp;
branches;
next	1.9;

1.9
date	2005.07.25.22.12.33;	author tgl;	state Exp;
branches;
next	1.8;

1.8
date	2003.06.27.19.08.38;	author tgl;	state Exp;
branches;
next	1.7;

1.7
date	2003.04.03.23.32.47;	author tgl;	state Exp;
branches;
next	1.6;

1.6
date	2003.02.23.23.27.21;	author tgl;	state Exp;
branches;
next	1.5;

1.5
date	2002.08.27.03.06.16;	author momjian;	state Exp;
branches;
next	1.4;

1.4
date	2002.08.27.03.02.31;	author momjian;	state Exp;
branches;
next	1.3;

1.3
date	2002.08.27.03.01.13;	author momjian;	state Exp;
branches;
next	1.2;

1.2
date	2002.08.27.02.54.39;	author momjian;	state Exp;
branches;
next	1.1;

1.1
date	2002.08.27.02.52.42;	author momjian;	state Exp;
branches;
next	;


desc
@@


1.11
log
@Add restart_after_crash GUC.

Normally, we automatically restart after a backend crash, but in some
cases when PostgreSQL is invoked by clusterware it may be desirable to
suppress this behavior, so we provide an option which does this.
Since no existing GUC group quite fits, create a new group called
"error handling options" for this and the previously undocumented GUC
exit_on_error, which is now documented.

Review by Fujii Masao.
@
text
@#!/bin/sh

## currently, this script makes a lot of assumptions:
## in postgresql.conf.sample:
##   1) the valid config settings may be preceded by a '#', but NOT '# '
##      (we use this to skip comments)
##   2) the valid config settings will be followed immediately by  ' =' 
##      (at least one space preceding the '=')
## in guc.c:
##   3) the options have PGC_ on the same line as the option
##   4) the options have '{' on the same line as the option

##  Problems
## 1) Don't know what to do with TRANSACTION ISOLATION LEVEL

## if an option is valid but shows up in only one file (guc.c but not
## postgresql.conf.sample), it should be listed here so that it 
## can be ignored
INTENTIONALLY_NOT_INCLUDED="autocommit debug_deadlocks \
is_superuser lc_collate lc_ctype lc_messages lc_monetary lc_numeric lc_time \
pre_auth_delay role seed server_encoding server_version server_version_int \
session_authorization trace_lock_oidmin trace_lock_table trace_locks trace_lwlocks \
trace_notify trace_userlocks transaction_isolation transaction_read_only \
zero_damaged_pages"

### What options are listed in postgresql.conf.sample, but don't appear 
### in guc.c?

# grab everything that looks like a setting and convert it to lower case
SETTINGS=`grep ' =' postgresql.conf.sample | 
grep -v '^# ' | # strip comments
sed -e 's/^#//' | 
awk '{print $1}'`

SETTINGS=`echo "$SETTINGS" | tr 'A-Z' 'a-z'`

for i in $SETTINGS ; do 
  hidden=0
  ## it sure would be nice to replace this with an sql "not in" statement
  ## it doesn't seem to make sense to have things in .sample and not in guc.c
#  for hidethis in $INTENTIONALLY_NOT_INCLUDED ; do
#    if [ "$hidethis" = "$i" ] ; then 
#      hidden=1
#    fi
#  done
  if [ "$hidden" -eq 0 ] ; then
    grep -i '"'$i'"' guc.c > /dev/null
    if [ $? -ne 0 ] ; then 
      echo "$i seems to be missing from guc.c"; 
    fi; 
  fi
done

### What options are listed in guc.c, but don't appear 
### in postgresql.conf.sample?

# grab everything that looks like a setting and convert it to lower case

SETTINGS=`grep '{.* PGC_' guc.c | awk '{print $1}' | \
          sed -e 's/{//g' -e 's/"//g' -e 's/,//'`

SETTINGS=`echo "$SETTINGS" | tr 'A-Z' 'a-z'`

for i in $SETTINGS ; do
  hidden=0
  ## it sure would be nice to replace this with an sql "not in" statement
  for hidethis in $INTENTIONALLY_NOT_INCLUDED ; do
    if [ "$hidethis" = "$i" ] ; then
      hidden=1
    fi
  done
  if [ "$hidden" -eq 0 ] ; then
    grep -i '#'$i' ' postgresql.conf.sample > /dev/null
    if [ $? -ne 0 ] ; then
      echo "$i seems to be missing from postgresql.conf.sample";
    fi
  fi
done
@


1.10
log
@Add new variable "server_version_num", which is almost the same as
"server_version" but uses the handy PG_VERSION_NUM which allows apps to
do things like if ($version >= 80200) without having to parse apart the
value of server_version themselves.

Greg Sabino Mullane greg@@turnstep.com
@
text
@d19 1
a19 1
INTENTIONALLY_NOT_INCLUDED="autocommit debug_deadlocks exit_on_error \
@


1.9
log
@Add SET ROLE.  This is a partial commit of Stephen Frost's recent patch;
I'm still working on the has_role function and information_schema changes.
@
text
@d21 3
a23 3
pre_auth_delay role seed server_encoding server_version session_authorization \
trace_lock_oidmin trace_lock_table trace_locks trace_lwlocks trace_notify \
trace_userlocks transaction_isolation transaction_read_only \
@


1.8
log
@Add is_superuser parameter reporting, soon to be used by psql.
@
text
@d21 1
a21 1
pre_auth_delay seed server_encoding server_version session_authorization \
@


1.7
log
@Remove zero_damaged_pages from postgresql.conf.sample; the only way to
find out about it is to read the documentation that tells you how
dangerous it is.  Add default_transaction_read_only to documentation;
seems to have been overlooked in patch that added read-only transactions.
Clean up check_guc comparison script, which has been suffering bit rot.
@
text
@d19 6
a24 3
INTENTIONALLY_NOT_INCLUDED="pre_auth_delay lc_messages lc_monetary \
lc_numeric lc_time seed server_encoding session_authorization \
transaction_isolation transaction_read_only zero_damaged_pages"
@


1.6
log
@Remove no-longer-used FixBTree GUC variable.
@
text
@d4 8
a11 6
## 1) the valid config settings may be preceded by a '#', but NOT '# '
##    (we use this to skip comments)
## 2) the valid config settings will be followed immediately by  ' =' 
##    (at least one space preceding the '=' for guc.c)
## 3) the options have PGC_ on the same line as the option
## 4) the options have '{ ' on the same line as the option
d16 2
a17 2
## if an option is valid but shows up in only one file (guc.c or 
## postgresql.conf.sample, it should be listed here so that it 
d20 2
a21 1
lc_time lc_numeric server_encoding session_authorization"
d32 1
a32 2
SETTINGS=`echo "$SETTINGS" | 
tr 'A-Z' 'a-z' # lowercase`
d37 6
a42 5
  for hidethis in $INTENTIONALLY_NOT_INCLUDED ; do
    if [ "$hidethis" = "$i" ] ; then 
      hidden=1
    fi
  done
d44 1
a44 1
    grep -i $i guc.c > /dev/null
d56 3
a58 2
SETTINGS=`grep '{ .*PGC_' guc.c | awk '{print $2}' | \
          sed -e 's/"//g' -e 's/,//'`
d63 1
d70 1
a70 1
    grep -i $i postgresql.conf.sample > /dev/null
@


1.5
log
@Add to skip list in check_guc
@
text
@d18 1
a18 1
lc_time lc_numeric fixbtree server_encoding session_authorization"
@


1.4
log
@Comment cleanup.
@
text
@d18 1
a18 1
lc_time lc_numeric fixbtree"
@


1.3
log
@Script cleanups.
@
text
@d14 1
a14 1
## if an option is valid but shows up in only one file (guc.h or 
d21 1
a21 1
### in guc.h?
d48 1
a48 1
### What options are listed in guc.h, but don't appear 
@


1.2
log
@Clean up script.
@
text
@d4 6
a9 8
## 1) location of guc.c and postgresql.conf.sample relative to script
##       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
d24 7
a30 3
SETTINGS=`grep ' =' postgresql.conf.sample | grep -v '^# ' | \
          sed -e 's/^#//' | awk '{print $1}'`
SETTINGS=`echo "$SETTINGS" | tr 'A-Z' 'a-z'`
d36 1
a36 1
    if [ "$i" = "$hidethis" ] ; then 
d40 3
a42 3
  if [ "0" = "$hidden" ] ; then
    grep -i $i guc.c > /dev/null; 
    if [ ! $? = 0 ] ; then 
d60 1
a60 1
    if [ "$i" = "$hidethis" ] ; then
d64 3
a66 3
  if [ "0" = "$hidden" ] ; then
    grep -i $i postgresql.conf.sample > /dev/null;
    if [ ! $? = 0 ] ; then
@


1.1
log
@Add check_guc utility to compare guc.c and postgresql.conf.sample.
@
text
@a21 4
#self_path stolen from pg_ctl
self_path=`echo "$0" | sed 's,/[^/]*$,,'`       # (dirname command is not portable)
PATH_TO_GUC="$self_path"

d26 1
a26 1
SETTINGS=`grep ' =' $PATH_TO_GUC/postgresql.conf.sample | grep -v '^# ' | \
d39 1
a39 1
    grep -i $i $PATH_TO_GUC/guc.c > /dev/null; 
d51 1
a51 1
SETTINGS=`grep '{ .*PGC_' $PATH_TO_GUC/guc.c | awk '{print $2}' | \
d63 1
a63 1
    grep -i $i $PATH_TO_GUC/postgresql.conf.sample > /dev/null;
@
