[packages/postgresql] enable CRC error detection for data pages by default this induces performance penalty, but if anyone

gotar gotar at pld-linux.org
Wed Jul 30 14:11:59 CEST 2014


commit b8d42a8b7f4563906c6a235051a9750e688e2d1b
Author: Tomasz Pala <gotar at pld-linux.org>
Date:   Wed Jul 30 14:02:47 2014 +0200

    enable CRC error detection for data pages by default
    this induces performance penalty, but if anyone blindly uses PLD init
    script to create database, he will be better protected from silent data
    corruption, while anyone familiar with PSQL can disable it on his own

 postgresql.init | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/postgresql.init b/postgresql.init
index 1a5f91b..9fc8579 100644
--- a/postgresql.init
+++ b/postgresql.init
@@ -80,7 +80,7 @@ pgstatus() {
 		PG_STATUS="not running"
 	elif [ $status -eq 0 ]; then
 		PG_STATUS="running"
-        # or maybe grab it from postmaster.pid file?
+	# or maybe grab it from postmaster.pid file?
 		PG_PID=$(echo "$output" | awk '/PID: / { match($0, "PID: [0-9]+"); print substr($0,RSTART+5,RLENGTH-5) }')
 	fi
 }
@@ -176,10 +176,10 @@ RETVAL=0
 # db clusters.
 case "$action" in
   start)
-  	start
+	start
 	;;
   stop)
-  	stop
+	stop
 	;;
   status)
 	for pgdir in $DB_CLUSTERS; do
@@ -251,7 +251,7 @@ case "$action" in
 			mkdir -p $pgdir
 			chmod 700 $pgdir
 			chown postgres:postgres $pgdir
-			LC_ALL=$PG_INIT_LOCALE TMPDIR=/tmp su postgres -s /bin/sh -c "initdb -E UNICODE -D $pgdir"
+			LC_ALL=$PG_INIT_LOCALE TMPDIR=/tmp su postgres -s /bin/sh -c "initdb -E UNICODE --data-checksums -D $pgdir"
 		fi
 	done
 	echo $(nls "REMEMBER to setup password for user \"postgres\"")'!'
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/postgresql.git/commitdiff/b8d42a8b7f4563906c6a235051a9750e688e2d1b



More information about the pld-cvs-commit mailing list