]> git.pld-linux.org Git - packages/postgresql.git/commitdiff
enable CRC error detection for data pages by default
authorTomasz Pala <gotar@pld-linux.org>
Wed, 30 Jul 2014 12:02:47 +0000 (14:02 +0200)
committerTomasz Pala <gotar@pld-linux.org>
Wed, 30 Jul 2014 12:02:47 +0000 (14:02 +0200)
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

index 1a5f91bdc3a94e7a507c69349c4f041b73930e6f..9fc8579af280f1927206d8b1a2a152d0d598280e 100644 (file)
@@ -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\"")'!'
This page took 0.13142 seconds and 4 git commands to generate.