aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2003-04-03 23:32:47 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2003-04-03 23:32:47 +0000
commita385186ff737a935631efd9ff4294588988e67fb (patch)
tree61ea09bbf07250087beda568aa05bebeb913e802 /src
parentf1fb9e009797aaef7619d9191eaa3ff6685f1164 (diff)
downloadpostgresql-a385186ff737a935631efd9ff4294588988e67fb.tar.gz
postgresql-a385186ff737a935631efd9ff4294588988e67fb.zip
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.
Diffstat (limited to 'src')
-rwxr-xr-xsrc/backend/utils/misc/check_guc45
-rw-r--r--src/backend/utils/misc/postgresql.conf.sample2
2 files changed, 26 insertions, 21 deletions
diff --git a/src/backend/utils/misc/check_guc b/src/backend/utils/misc/check_guc
index 0268396c741..7930d06f6e6 100755
--- a/src/backend/utils/misc/check_guc
+++ b/src/backend/utils/misc/check_guc
@@ -1,21 +1,24 @@
#!/bin/sh
## currently, this script makes a lot of assumptions:
-## 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
+## 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 or
-## postgresql.conf.sample, it should be listed here so that it
+## 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="pre_auth_delay lc_messages lc_monetary \
-lc_time lc_numeric server_encoding session_authorization"
+lc_numeric lc_time seed server_encoding session_authorization \
+transaction_isolation transaction_read_only zero_damaged_pages"
### What options are listed in postgresql.conf.sample, but don't appear
### in guc.c?
@@ -26,19 +29,19 @@ grep -v '^# ' | # strip comments
sed -e 's/^#//' |
awk '{print $1}'`
-SETTINGS=`echo "$SETTINGS" |
-tr 'A-Z' 'a-z' # lowercase`
+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
+ ## 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
+ grep -i '"'$i'"' guc.c > /dev/null
if [ $? -ne 0 ] ; then
echo "$i seems to be missing from guc.c";
fi;
@@ -50,19 +53,21 @@ done
# grab everything that looks like a setting and convert it to lower case
-SETTINGS=`grep '{ .*PGC_' guc.c | awk '{print $2}' | \
- sed -e 's/"//g' -e 's/,//'`
+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
+ grep -i '#'$i' ' postgresql.conf.sample > /dev/null
if [ $? -ne 0 ] ; then
echo "$i seems to be missing from postgresql.conf.sample";
fi
diff --git a/src/backend/utils/misc/postgresql.conf.sample b/src/backend/utils/misc/postgresql.conf.sample
index 7039a7572a3..f32aa3ff4cb 100644
--- a/src/backend/utils/misc/postgresql.conf.sample
+++ b/src/backend/utils/misc/postgresql.conf.sample
@@ -205,6 +205,7 @@
#authentication_timeout = 60 # 1-600, in seconds
#deadlock_timeout = 1000 # in milliseconds
#default_transaction_isolation = 'read committed'
+#default_transaction_read_only = false
#extra_float_digits = 0 # min -15, max 2
#max_expr_depth = 10000 # min 10
#max_files_per_process = 1000 # min 25
@@ -213,6 +214,5 @@
#sql_inheritance = true
#transform_null_equals = false
#statement_timeout = 0 # 0 is disabled, in milliseconds
-#zero_damaged_pages = false # set this true only for disaster recovery
#db_user_namespace = false
#preload_libraries = ''