Re: 9.2.3 crashes during archive recovery - Mailing list pgsql-hackers

From Kyotaro HORIGUCHI
Subject Re: 9.2.3 crashes during archive recovery
Date
Msg-id 20130305.195310.254802174.horiguchi.kyotaro@lab.ntt.co.jp
Whole thread Raw
In response to Re: 9.2.3 crashes during archive recovery  (Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>)
List pgsql-hackers
Sorry, I sent wrong script.

> The head of origin/REL9_2_STABLE shows the behavior I metioned in
> the last message when using the shell script attached. 9.3dev
> runs as expected.

regards,

-- 
Kyotaro Horiguchi
NTT Open Source Software Center
#! /bin/sh
pgpath="$HOME/bin/pgsql_924b"
echo $PATH | grep $pgpath | wc -l
if [ `echo $PATH | grep $pgpath | wc -l` == 0 ]; thenPATH=$pgpath/bin:$PATH
fi

PGDATA0="$HOME/data/pgdata_0"
PGDATA1="$HOME/data/pgdata_1"
PGARC0="$HOME/data/pgarc_0"
PGARC1="$HOME/data/pgarc_1"
PGPORT0=5432
PGPORT1=5433
unset PGPORT
unset PGDATA
echo "Postgresql is \"`which postgres`\""
killall -9 postgres
rm -rf $PGDATA0/* $PGARC0/*
initdb -D $PGDATA0
cat >> $PGDATA0/postgresql.conf <<EOF
port=5432
wal_level = hot_standby
checkpoint_segments = 300
checkpoint_timeout = 1h
archive_mode = on
archive_command = 'cp %p $PGARC0/%f'
max_wal_senders = 3
hot_standby = on
#log_min_messages = debug5
EOF
cat >> $PGDATA0/pg_hba.conf <<EOF
local   replication     horiguti                                trust
EOF
echo ## Startup master
pg_ctl -D $PGDATA0 -w  -o "-p $PGPORT0" start

rm -rf $PGDATA1/* $PGARC1/*
echo "## basebackup"
pg_basebackup -h /tmp -p $PGPORT0 -F p -X s -D $PGDATA1
chmod 700 $PGDATA1
cat >> $PGDATA1/recovery.conf <<EOF
standby_mode = yes
primary_conninfo='host=/tmp port=5432'
restore_command='a=$PGARC1; if [ -f \$a/%f ]; then cp \$a/%f %p; else exit 1; fi'
EOF

echo "## Startup standby"
pg_ctl -D $PGDATA1 -o "-p $PGPORT1" start
echo "## Sleep for 5 seconds"
sleep 5

echo "## Shutdown standby"
pg_ctl -D $PGDATA1 -w stop -m f

echo "## Shutdown master in immediate mode"
pg_ctl -D $PGDATA0 -w stop -m i

cat >> $PGDATA0/recovery.conf <<EOF
standby_mode = yes
primary_conninfo='host=/tmp port=5433'
restore_command='a=$PGARC0; if [ -f \$a/%f ]; then cp \$a/%f %p; else exit 1; fi'
EOF

echo "## Starting master as a standby"
pg_ctl -D $PGDATA0  start

pgsql-hackers by date:

Previous
From: Kyotaro HORIGUCHI
Date:
Subject: Re: Re: proposal: a width specification for s specifier (format function), fix behave when positional and ordered placeholders are used
Next
From: KONDO Mitsumasa
Date:
Subject: Re: 9.2.3 crashes during archive recovery