From: Tomasz Pala Date: Wed, 30 Jul 2014 12:02:47 +0000 (+0200) Subject: enable CRC error detection for data pages by default X-Git-Tag: auto/th/postgresql-9.3.5-1~1 X-Git-Url: https://git.pld-linux.org/?a=commitdiff_plain;ds=sidebyside;h=b8d42a8b7f4563906c6a235051a9750e688e2d1b;p=packages%2Fpostgresql.git 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 --- 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\"")'!'