No subject


Sat Nov 16 19:48:32 JST 2013


figure it out.

What am I missing?

I have attached the log files of all three nodes of a recovery run and the
log of my synctest.
any help will be appreciated.

sincerely 
Michel Kirstein



------=_NextPart_000_0077_01CFC692.709101F0
Content-Type: application/octet-stream;
	name="Node1.log"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="Node1.log"

<2014-09-02 08:20:24 CEST [unbekannt] [unbekannt] [unbekannt]  0 >LOG:  =
Verbindung empfangen: Host=3DPGPool Port=3D38164
<2014-09-02 08:20:27 CEST [unbekannt] [unbekannt] [unbekannt]  0 >LOG:  =
Verbindung empfangen: Host=3DPGPool Port=3D38167
<2014-09-02 08:20:27 CEST postgres postgres [unbekannt] PGPool(38167) 0 =
authentication>LOG:  Verbindung authorisiert: Benutzer=3Dpostgres =
Datenbank=3Dpostgres
<2014-09-02 08:20:27 CEST postgres postgres psql PGPool(38167) 0 =
idle>LOG:  Anweisung: CREATE DATABASE test;
<2014-09-02 08:20:27 CEST     0 >LOG:  checkpoint starting: immediate =
force wait
<2014-09-02 08:20:27 CEST     0 >LOG:  checkpoint complete: wrote 3 =
buffers (0.0%); 0 transaction log file(s) added, 0 removed, 1 recycled; =
write=3D0.002 s, sync=3D0.015 s, total=3D0.034 s; sync files=3D3, =
longest=3D0.015 s, average=3D0.005 s
<2014-09-02 08:20:29 CEST     0 >LOG:  checkpoint starting: immediate =
force wait
<2014-09-02 08:20:29 CEST     0 >LOG:  checkpoint complete: wrote 0 =
buffers (0.0%); 0 transaction log file(s) added, 0 removed, 1 recycled; =
write=3D0.001 s, sync=3D0.000 s, total=3D0.005 s; sync files=3D0, =
longest=3D0.000 s, average=3D0.000 s
<2014-09-02 08:20:29 CEST postgres postgres psql PGPool(38167) 0 CREATE =
DATABASE>LOG:  Dauer: 1736.034 ms
<2014-09-02 08:20:29 CEST [unbekannt] [unbekannt] [unbekannt]  0 >LOG:  =
Verbindung empfangen: Host=3DNode1 Port=3D56863
<2014-09-02 08:20:29 CEST postgres postgres [unbekannt] Node1(56863) 0 =
authentication>LOG:  Verbindung authorisiert: Benutzer=3Dpostgres =
Datenbank=3Dpostgres
<2014-09-02 08:20:29 CEST postgres postgres psql Node1(56863) 0 =
idle>LOG:  Anweisung: select oid,datname from pg_database where datname =
=3D 'test';
<2014-09-02 08:20:29 CEST postgres postgres psql Node1(56863) 0 =
SELECT>LOG:  Dauer: 0.953 ms
<2014-09-02 08:20:29 CEST [unbekannt] [unbekannt] [unbekannt]  0 >LOG:  =
Verbindung empfangen: Host=3DPGPool Port=3D38170
<2014-09-02 08:20:34 CEST [unbekannt] [unbekannt] [unbekannt]  0 >LOG:  =
Verbindung empfangen: Host=3DPGPool Port=3D38173
<2014-09-02 08:20:34 CEST postgres postgres [unbekannt] PGPool(38173) 0 =
authentication>LOG:  Verbindung authorisiert: Benutzer=3Dpostgres =
Datenbank=3Dpostgres
<2014-09-02 08:20:39 CEST postgres postgres psql PGPool(38173) 0 =
idle>LOG:  Anweisung: Drop DATABASE test;
<2014-09-02 08:20:39 CEST     0 >LOG:  checkpoint starting: immediate =
force wait
<2014-09-02 08:20:39 CEST     0 >LOG:  checkpoint complete: wrote 1 =
buffers (0.0%); 0 transaction log file(s) added, 0 removed, 0 recycled; =
write=3D0.024 s, sync=3D0.012 s, total=3D0.124 s; sync files=3D1, =
longest=3D0.012 s, average=3D0.012 s
<2014-09-02 08:20:39 CEST postgres postgres psql PGPool(38173) 0 DROP =
DATABASE>LOG:  Dauer: 234.793 ms
<2014-09-02 08:21:14 CEST [unbekannt] [unbekannt] [unbekannt]  0 >LOG:  =
Verbindung empfangen: Host=3DPGPool Port=3D38183
<2014-09-02 08:21:14 CEST template1 recovery [unbekannt] PGPool(38183) 0 =
authentication>LOG:  Verbindung authorisiert: Benutzer=3Drecovery =
Datenbank=3Dtemplate1
<2014-09-02 08:21:14 CEST template1 recovery [unbekannt] PGPool(38183) 0 =
idle>LOG:  Anweisung: CHECKPOINT
<2014-09-02 08:21:14 CEST     0 >LOG:  checkpoint starting: immediate =
force wait
<2014-09-02 08:21:14 CEST     0 >LOG:  checkpoint complete: wrote 1 =
buffers (0.0%); 0 transaction log file(s) added, 0 removed, 0 recycled; =
write=3D0.001 s, sync=3D0.000 s, total=3D0.005 s; sync files=3D1, =
longest=3D0.000 s, average=3D0.000 s
<2014-09-02 08:21:14 CEST template1 recovery [unbekannt] PGPool(38183) 0 =
CHECKPOINT>LOG:  Dauer: 100.458 ms
<2014-09-02 08:21:14 CEST template1 recovery [unbekannt] PGPool(38183) 0 =
idle>LOG:  Anweisung: SELECT pgpool_recovery('copy-base-backup', =
'Node3', '/opt/pgsql_data')
#!/bin/sh -xv
# For Debug-information add -xv to shebang above.

export LC_MESSAGES=3Den_US.UTF-8
+ export LC_MESSAGES=3Den_US.UTF-8
+ LC_MESSAGES=3Den_US.UTF-8
PSQL=3D/usr/bin/psql=20
+ PSQL=3D/usr/bin/psql
SCP=3D/usr/bin/scp=20
+ SCP=3D/usr/bin/scp
SSH=3D/usr/bin/ssh
+ SSH=3D/usr/bin/ssh
IFCONFIG=3D/sbin/ifconfig
+ IFCONFIG=3D/sbin/ifconfig
PG_CTL=3D/usr/bin/pg_ctl
+ PG_CTL=3D/usr/bin/pg_ctl
LOGGER=3D"/bin/logger -i -s -p local0.info -t pgpool"
+ LOGGER=3D'/bin/logger -i -s -p local0.info -t pgpool'
RSYNC=3D"/usr/bin/rsync --archive --checksum --compress --rsh=3D$SSH =
--quiet --delete"
+ RSYNC=3D'/usr/bin/rsync --archive --checksum --compress =
--rsh=3D/usr/bin/ssh --quiet --delete'
BASENAME=3D$(/usr/bin/basename $0)
/usr/bin/basename $0
++ /usr/bin/basename /opt/pgsql_data/copy-base-backup
+ BASENAME=3Dcopy-base-backup
HOSTNAME=3D$(/bin/hostname)
/bin/hostname
++ /bin/hostname
+ HOSTNAME=3DNode1
ID=3D$(/usr/bin/id -un)
/usr/bin/id -un
++ /usr/bin/id -un
+ ID=3Dpostgres
PGPOOL_HOST=3DPGPool
+ PGPOOL_HOST=3DPGPool

SRC_HOST=3D$( /sbin/ifconfig | grep 'inet addr:' | grep -v '127.0.0.1' | =
cut -d: -f2 | awk '{ print $1 }' ) # local ipaddr of eth0. Warning! does =
not work with multiple ethernet-adapters.
 /sbin/ifconfig | grep 'inet addr:' | grep -v '127.0.0.1' | cut -d: -f2 =
| awk '{ print $1 }'=20
++ grep 'inet addr:'
++ grep -v 127.0.0.1
++ cut -d: -f2
++ awk '{ print $1 }'
++ /sbin/ifconfig
+ SRC_HOST=3DNode1
SRC_DATA=3D$1 # Database cluster path of a master node.
+ SRC_DATA=3D/opt/pgsql_data
DST_HOST=3D$2 # Hostname of a recovery target node.
+ DST_HOST=3DNode3
DST_DATA=3D$3 # Database cluster path of a recovery target node.
+ DST_DATA=3D/opt/pgsql_data
WAL_DATA=3D"/opt/backup/WAL-archive" # Database cluster archive path.
+ WAL_DATA=3D/opt/backup/WAL-archive

$LOGGER "Executing $BASENAME as user $ID"=20
+ /bin/logger -i -s -p local0.info -t pgpool 'Executing copy-base-backup =
as user postgres'
pgpool[15959]: Executing copy-base-backup as user postgres
$LOGGER "Local IP: $SRC_HOST"=20
+ /bin/logger -i -s -p local0.info -t pgpool 'Local IP: Node1'
pgpool[15960]: Local IP: Node1

$LOGGER "Stopping remote PostgreSQL server"
+ /bin/logger -i -s -p local0.info -t pgpool 'Stopping remote PostgreSQL =
server'
pgpool[15961]: Stopping remote PostgreSQL server
$SSH -T $DST_HOST "test -f $SRC_DATA/postmaster.pid && $PG_CTL stop -s =
-D $DST_DATA/ -mf"
+ /usr/bin/ssh -T Node3 'test -f /opt/pgsql_data/postmaster.pid && =
/usr/bin/pg_ctl stop -s -D /opt/pgsql_data/ -mf'
if  $SSH -T $DST_HOST "test -f $SRC_DATA/postmaster.pid"
    then $LOGGER "Failed to remote_stop $DST_HOST." && exit 1;
    else $LOGGER "$DST_HOST is offline. continue..."
fi
+ /usr/bin/ssh -T Node3 'test -f /opt/pgsql_data/postmaster.pid'
+ /bin/logger -i -s -p local0.info -t pgpool 'Node3 is offline. =
continue...'
pgpool[15964]: Node3 is offline. continue...

$LOGGER "Enabling Online-Recovery-WAL"
+ /bin/logger -i -s -p local0.info -t pgpool 'Enabling =
Online-Recovery-WAL'
pgpool[15965]: Enabling Online-Recovery-WAL
touch $SRC_DATA/onlinerecovery.true || { $LOGGER "Failed to enable =
Online-Recovery-WAL." && exit 1; }
+ touch /opt/pgsql_data/onlinerecovery.true

$LOGGER "Executing pg_start_backup"
+ /bin/logger -i -s -p local0.info -t pgpool 'Executing pg_start_backup'
pgpool[15967]: Executing pg_start_backup
$PSQL -d postgres -c "select pg_start_backup('pgpool-recovery')" &&  =
$LOGGER "backup-mode enabled" || { $LOGGER "Failed to execute =
pg_start_backup." && exit 1; }
+ /usr/bin/psql -d postgres -c 'select =
pg_start_backup('\''pgpool-recovery'\'')'
<2014-09-02 08:21:15 CEST [unbekannt] [unbekannt] [unbekannt]  0 >LOG:  =
Verbindung empfangen: Host=3D[local]
<2014-09-02 08:21:15 CEST postgres postgres [unbekannt] [local] 0 =
authentication>LOG:  Verbindung authorisiert: Benutzer=3Dpostgres =
Datenbank=3Dpostgres
<2014-09-02 08:21:15 CEST postgres postgres psql [local] 0 idle>LOG:  =
Anweisung: select pg_start_backup('pgpool-recovery')
<2014-09-02 08:21:15 CEST     0 >LOG:  checkpoint starting: force wait
<2014-09-02 08:21:15 CEST     0 >LOG:  checkpoint complete: wrote 0 =
buffers (0.0%); 0 transaction log file(s) added, 0 removed, 0 recycled; =
write=3D0.001 s, sync=3D0.000 s, total=3D0.019 s; sync files=3D0, =
longest=3D0.000 s, average=3D0.000 s
<2014-09-02 08:21:16 CEST postgres postgres psql [local] 0 SELECT>LOG:  =
Dauer: 223.510 ms
 pg_start_backup=20
-----------------
 48/B6000020
(1 row)

+ /bin/logger -i -s -p local0.info -t pgpool 'backup-mode enabled'
pgpool[15973]: backup-mode enabled

$LOGGER "Rsyncing directory /data/"
+ /bin/logger -i -s -p local0.info -t pgpool 'Rsyncing directory /data/'
pgpool[15974]: Rsyncing directory /data/
$RSYNC --exclude postmaster.pid --exclude postmaster --exclude pg_log =
--exclude pg_xlog --exclude backup_label --exclude onlinerecovery.true =
$SRC_DATA/ $DST_HOST:$DST_DATA/ &&  $LOGGER "rsync done." || { $LOGGER =
"rsync data/ failed..." && exit 1; }
+ /usr/bin/rsync --archive --checksum --compress --rsh=3D/usr/bin/ssh =
--quiet --delete --exclude postmaster.pid --exclude postmaster --exclude =
pg_log --exclude pg_xlog --exclude backup_label --exclude =
onlinerecovery.true /opt/pgsql_data/ Node3:/opt/pgsql_data/
+ /bin/logger -i -s -p local0.info -t pgpool 'rsync done.'
pgpool[15977]: rsync done.

$LOGGER "Rsyncing directory datenbanken"
+ /bin/logger -i -s -p local0.info -t pgpool 'Rsyncing directory =
datenbanken'
pgpool[15978]: Rsyncing directory datenbanken
$RSYNC  /opt/datenbanken/ $DST_HOST:/opt/datenbanken/ &&  $LOGGER =
"Rsynced directory datenbanken." || { $LOGGER "rsync datenbanken/ =
failed..." && exit 1; }
+ /usr/bin/rsync --archive --checksum --compress --rsh=3D/usr/bin/ssh =
--quiet --delete /opt/datenbanken/ Node3:/opt/datenbanken/
+ /bin/logger -i -s -p local0.info -t pgpool 'Rsynced directory =
datenbanken.'
pgpool[15988]: Rsynced directory datenbanken.

$LOGGER "Creating file recovery.conf"
+ /bin/logger -i -s -p local0.info -t pgpool 'Creating file =
recovery.conf'
pgpool[15989]: Creating file recovery.conf
$SSH -T $DST_HOST "echo \"restore_command =3D '$SCP -BC =
$SRC_HOST:$WAL_DATA/%f %p'\" > $SRC_DATA/recovery.conf" && $LOGGER =
"created recovery.conf" || { $LOGGER "creating recovery.conf failed..." =
&& exit 1; }
+ /usr/bin/ssh -T Node3 'echo "restore_command =3D '\''/usr/bin/scp -BC =
Node1:/opt/backup/WAL-archive/%f %p'\''" > =
/opt/pgsql_data/recovery.conf'
+ /bin/logger -i -s -p local0.info -t pgpool 'created recovery.conf'
pgpool[15991]: created recovery.conf

$LOGGER "Executing pg_stop_backup"
+ /bin/logger -i -s -p local0.info -t pgpool 'Executing pg_stop_backup'
pgpool[15992]: Executing pg_stop_backup
$PSQL -d postgres -c 'select pg_stop_backup()' && $LOGGER "backup-mode =
disabled" || { $LOGGER "Failed to execute pg_stop_backup." && exit 1; }
+ /usr/bin/psql -d postgres -c 'select pg_stop_backup()'
<2014-09-02 08:22:28 CEST [unbekannt] [unbekannt] [unbekannt]  0 >LOG:  =
Verbindung empfangen: Host=3D[local]
<2014-09-02 08:22:28 CEST postgres postgres [unbekannt] [local] 0 =
authentication>LOG:  Verbindung authorisiert: Benutzer=3Dpostgres =
Datenbank=3Dpostgres
<2014-09-02 08:22:28 CEST postgres postgres psql [local] 0 idle>LOG:  =
Anweisung: select pg_stop_backup()
<2014-09-02 08:22:29 CEST postgres postgres psql [local] 0 =
SELECT>HINWEIS:  pg_stop_backup abgeschlossen, alle ben=C3=B6tigten =
WAL-Segmente wurden archiviert
<2014-09-02 08:22:29 CEST postgres postgres psql [local] 0 SELECT>LOG:  =
Dauer: 1035.888 ms
HINWEIS:  pg_stop_backup abgeschlossen, alle ben=C3=B6tigten =
WAL-Segmente wurden archiviert
 pg_stop_backup=20
----------------
 48/B7000048
(1 row)

+ /bin/logger -i -s -p local0.info -t pgpool 'backup-mode disabled'
pgpool[16001]: backup-mode disabled

$LOGGER "Creating activeservers.lst"
+ /bin/logger -i -s -p local0.info -t pgpool 'Creating =
activeservers.lst'
pgpool[16002]: Creating activeservers.lst
$PSQL -h$PGPOOL_HOST -dpostgres -q -t --field-separator=3D" " --no-align =
-c "show pool_nodes;" | while read line; do
    if [ "$(echo $line | awk '{print $4}')" =3D "2" ]; then
         echo $line | awk '{print $2}' >> $SRC_DATA/activeservers.lst
    fi
done
+ /usr/bin/psql -hPGPool -dpostgres -q -t '--field-separator=3D ' =
--no-align -c 'show pool_nodes;'
+ read line
<2014-09-02 08:22:29 CEST [unbekannt] [unbekannt] [unbekannt]  0 >LOG:  =
Verbindung empfangen: Host=3DPGPool Port=3D38184
<2014-09-02 08:22:29 CEST postgres postgres [unbekannt] PGPool(38184) 0 =
authentication>LOG:  Verbindung authorisiert: Benutzer=3Dpostgres =
Datenbank=3Dpostgres
echo $line | awk '{print $4}'
++ awk '{print $4}'
++ echo 0 Node1 5432 2 0.333333 master
+ '[' 2 =3D 2 ']'
+ echo 0 Node1 5432 2 0.333333 master
+ awk '{print $2}'
+ read line
echo $line | awk '{print $4}'
++ awk '{print $4}'
++ echo 1 Node2 5432 2 0.333333 slave
+ '[' 2 =3D 2 ']'
+ echo 1 Node2 5432 2 0.333333 slave
+ awk '{print $2}'
+ read line
echo $line | awk '{print $4}'
++ awk '{print $4}'
++ echo 2 Node3 5432 3 0.333333 slave
+ '[' 3 =3D 2 ']'
+ read line

exit 0
+ exit 0
<2014-09-02 08:22:29 CEST template1 recovery [unbekannt] PGPool(38183) 0 =
SELECT>LOG:  Dauer: 75390.122 ms
<2014-09-02 08:22:29 CEST template1 recovery [unbekannt] PGPool(38183) 0 =
idle>LOG:  Anweisung: CHECKPOINT
<2014-09-02 08:22:29 CEST     0 >LOG:  checkpoint starting: immediate =
force wait
<2014-09-02 08:22:30 CEST     0 >LOG:  checkpoint complete: wrote 0 =
buffers (0.0%); 0 transaction log file(s) added, 0 removed, 1 recycled; =
write=3D0.001 s, sync=3D0.000 s, total=3D0.132 s; sync files=3D0, =
longest=3D0.000 s, average=3D0.000 s
<2014-09-02 08:22:30 CEST template1 recovery [unbekannt] PGPool(38183) 0 =
CHECKPOINT>LOG:  Dauer: 205.466 ms
<2014-09-02 08:22:30 CEST template1 recovery [unbekannt] PGPool(38183) 0 =
idle>LOG:  Anweisung: SELECT pgpool_recovery('pgpool_recovery_pitr', =
'Node3', '/opt/pgsql_data')
#! /bin/sh -xv
# For Debug-information add -xv to shebang above.

export LC_MESSAGES=3Den_US.UTF-8
+ export LC_MESSAGES=3Den_US.UTF-8
+ LC_MESSAGES=3Den_US.UTF-8
PSQL=3D/usr/bin/psql
+ PSQL=3D/usr/bin/psql
LOGGER=3D"/bin/logger -i -p local0.info -t pgpool"
+ LOGGER=3D'/bin/logger -i -p local0.info -t pgpool'
BASENAME=3D$(/usr/bin/basename $0)
/usr/bin/basename $0
++ /usr/bin/basename /opt/pgsql_data/pgpool_recovery_pitr
+ BASENAME=3Dpgpool_recovery_pitr
ID=3D$(/usr/bin/id -un)
/usr/bin/id -un
++ /usr/bin/id -un
+ ID=3Dpostgres
WAL_DATA=3D"/opt/backup/WAL-archive" # Database cluster archive path.
+ WAL_DATA=3D/opt/backup/WAL-archive

$LOGGER "Executing $BASENAME as user $ID"=20
+ /bin/logger -i -p local0.info -t pgpool 'Executing =
pgpool_recovery_pitr as user postgres'
$LOGGER "Executing pg_switch_xlog"=20
+ /bin/logger -i -p local0.info -t pgpool 'Executing pg_switch_xlog'

while read host
do
    $PSQL -t -h$host -c 'SELECT datname FROM pg_database WHERE NOT =
datistemplate AND datallowconn' template1|
    while read i
    do
        if [ "$i" !=3D "" ]; then
            $PSQL -h$host -d$i -c "SELECT setval(oid, nextval(oid)) FROM =
pg_class WHERE relkind =3D 'S'"
        fi
    done
    $PSQL -d template1 -c "SELECT pgpool_switch_xlog('$WAL_DATA')" || { =
$LOGGER "Failed to switch xlog." && exit 1; }
done < /opt/pgsql_data/activeservers.lst
+ read host
+ /usr/bin/psql -t -hNode1 -c 'SELECT datname FROM pg_database WHERE NOT =
datistemplate AND datallowconn' template1
+ read i
<2014-09-02 08:22:30 CEST [unbekannt] [unbekannt] [unbekannt]  0 >LOG:  =
Verbindung empfangen: Host=3DNode1 Port=3D56874
<2014-09-02 08:22:30 CEST template1 postgres [unbekannt] Node1(56874) 0 =
authentication>LOG:  Verbindung authorisiert: Benutzer=3Dpostgres =
Datenbank=3Dtemplate1
<2014-09-02 08:22:30 CEST template1 postgres psql Node1(56874) 0 =
idle>LOG:  Anweisung: SELECT datname FROM pg_database WHERE NOT =
datistemplate AND datallowconn
<2014-09-02 08:22:30 CEST template1 postgres psql Node1(56874) 0 =
SELECT>LOG:  Dauer: 0.569 ms
+ '[' postgres '!=3D' '' ']'
+ /usr/bin/psql -hNode1 -dpostgres -c 'SELECT setval(oid, nextval(oid)) =
FROM pg_class WHERE relkind =3D '\''S'\'''
<2014-09-02 08:22:30 CEST [unbekannt] [unbekannt] [unbekannt]  0 >LOG:  =
Verbindung empfangen: Host=3DNode1 Port=3D56875
<2014-09-02 08:22:30 CEST postgres postgres [unbekannt] Node1(56875) 0 =
authentication>LOG:  Verbindung authorisiert: Benutzer=3Dpostgres =
Datenbank=3Dpostgres
<2014-09-02 08:22:30 CEST postgres postgres psql Node1(56875) 0 =
idle>LOG:  Anweisung: SELECT setval(oid, nextval(oid)) FROM pg_class =
WHERE relkind =3D 'S'
<2014-09-02 08:22:30 CEST postgres postgres psql Node1(56875) 0 =
SELECT>LOG:  Dauer: 0.815 ms
 setval=20
--------
(0 rows)

+ read i
+ '[' sospos '!=3D' '' ']'
+ /usr/bin/psql -hNode1 -dsospos -c 'SELECT setval(oid, nextval(oid)) =
FROM pg_class WHERE relkind =3D '\''S'\'''
<2014-09-02 08:22:30 CEST [unbekannt] [unbekannt] [unbekannt]  0 >LOG:  =
Verbindung empfangen: Host=3DNode1 Port=3D56876
<2014-09-02 08:22:30 CEST sospos postgres [unbekannt] Node1(56876) 0 =
authentication>LOG:  Verbindung authorisiert: Benutzer=3Dpostgres =
Datenbank=3Dsospos
<2014-09-02 08:22:30 CEST sospos postgres psql Node1(56876) 0 idle>LOG:  =
Anweisung: SELECT setval(oid, nextval(oid)) FROM pg_class WHERE relkind =
=3D 'S'
<2014-09-02 08:22:30 CEST sospos postgres psql Node1(56876) 0 =
SELECT>LOG:  Dauer: 18.781 ms
  setval =20
----------
       75
   824962
       75
       75
      562
       75
       75
       75
     1835
   866161
  1095935
       90
       83
       83
   158881
   105509
   110217
      121
    99976
       75
       75
       75
       75
       75
 14831065
       75
       75
   123526
    16905
       75
      472
       75
       75
       75
       75
       75
       75
       75
       75
       75
       75
       75
       75
       75
       75
      107
       75
       75
       75
       75
       75
    31446
       75
       75
     3754
       75
       75
       75
       75
       75
    25676
       75
       75
       74
       74
       74
       74
       74
       74
    79958
       75
   240721
       75
    88928
      108
       75
       75
      226
       79
       75
       75
      602
      115
    87052
       75
       75
       75
       75
       75
       75
    14444
   110670
     1983
      223
       75
       75
      130
      910
  1080917
       75
       75
       75
       75
  1003288
      552
    16044
     1990
       75
       75
       75
    80435
       75
       74
       74
(114 rows)

+ read i
+ '[' regin '!=3D' '' ']'
+ /usr/bin/psql -hNode1 -dregin -c 'SELECT setval(oid, nextval(oid)) =
FROM pg_class WHERE relkind =3D '\''S'\'''
<2014-09-02 08:22:30 CEST [unbekannt] [unbekannt] [unbekannt]  0 >LOG:  =
Verbindung empfangen: Host=3DNode1 Port=3D56877
<2014-09-02 08:22:30 CEST regin postgres [unbekannt] Node1(56877) 0 =
authentication>LOG:  Verbindung authorisiert: Benutzer=3Dpostgres =
Datenbank=3Dregin
<2014-09-02 08:22:30 CEST regin postgres psql Node1(56877) 0 idle>LOG:  =
Anweisung: SELECT setval(oid, nextval(oid)) FROM pg_class WHERE relkind =
=3D 'S'
<2014-09-02 08:22:30 CEST regin postgres psql Node1(56877) 0 SELECT>LOG: =
 Dauer: 0.873 ms
 setval=20
--------
(0 rows)

+ read i
+ '[' '' '!=3D' '' ']'
+ read i
+ /usr/bin/psql -d template1 -c 'SELECT =
pgpool_switch_xlog('\''/opt/backup/WAL-archive'\'')'
<2014-09-02 08:22:30 CEST [unbekannt] [unbekannt] [unbekannt]  0 >LOG:  =
Verbindung empfangen: Host=3D[local]
<2014-09-02 08:22:30 CEST template1 postgres [unbekannt] [local] 0 =
authentication>LOG:  Verbindung authorisiert: Benutzer=3Dpostgres =
Datenbank=3Dtemplate1
<2014-09-02 08:22:30 CEST template1 postgres psql [local] 0 idle>LOG:  =
Anweisung: SELECT pgpool_switch_xlog('/opt/backup/WAL-archive')
<2014-09-02 08:22:30 CEST template1 postgres psql [local] 0 SELECT>LOG:  =
pgpool_switch_xlog: waiting for =
"/opt/backup/WAL-archive/0000001100000048000000B8"
<2014-09-02 08:22:30 CEST template1 postgres psql [local] 0 =
SELECT>ANWEISUNG:  SELECT pgpool_switch_xlog('/opt/backup/WAL-archive')
<2014-09-02 08:22:31 CEST template1 postgres psql [local] 0 SELECT>LOG:  =
Dauer: 1030.025 ms
                pgpool_switch_xlog               =20
--------------------------------------------------
 /opt/backup/WAL-archive/0000001100000048000000B8
(1 row)

+ read host
+ read i
+ /usr/bin/psql -t -hNode2 -c 'SELECT datname FROM pg_database WHERE NOT =
datistemplate AND datallowconn' template1
+ '[' postgres '!=3D' '' ']'
+ /usr/bin/psql -hNode2 -dpostgres -c 'SELECT setval(oid, nextval(oid)) =
FROM pg_class WHERE relkind =3D '\''S'\'''
 setval=20
--------
(0 rows)

+ read i
+ '[' sospos '!=3D' '' ']'
+ /usr/bin/psql -hNode2 -dsospos -c 'SELECT setval(oid, nextval(oid)) =
FROM pg_class WHERE relkind =3D '\''S'\'''
  setval =20
----------
       75
   824962
       75
       75
      562
       75
       75
       75
     1835
   866161
  1095935
       90
       83
       83
   158881
   105509
   110217
      121
    99976
       75
       75
       75
       75
       75
 14831065
       75
       75
   123526
    16905
       75
      472
       75
       75
       75
       75
       75
       75
       75
       75
       75
       75
       75
       75
       75
       75
      107
       75
       75
       75
       75
       75
    31446
       75
       75
     3754
       75
       75
       75
       75
       75
    25676
       75
       75
       74
       74
       74
       74
       74
       74
    79958
       75
   240721
       75
    88928
      108
       75
       75
      226
       79
       75
       75
      602
      115
    87052
       75
       75
       75
       75
       75
       75
    14444
   110670
     1983
      223
       75
       75
      130
      910
  1080917
       75
       75
       75
       75
  1003288
      552
    16044
     1990
       75
       75
       75
    80435
       75
       74
       74
(114 rows)

+ read i
+ '[' regin '!=3D' '' ']'
+ /usr/bin/psql -hNode2 -dregin -c 'SELECT setval(oid, nextval(oid)) =
FROM pg_class WHERE relkind =3D '\''S'\'''
 setval=20
--------
(0 rows)

+ read i
+ '[' '' '!=3D' '' ']'
+ read i
+ /usr/bin/psql -d template1 -c 'SELECT =
pgpool_switch_xlog('\''/opt/backup/WAL-archive'\'')'
<2014-09-02 08:22:31 CEST [unbekannt] [unbekannt] [unbekannt]  0 >LOG:  =
Verbindung empfangen: Host=3D[local]
<2014-09-02 08:22:31 CEST template1 postgres [unbekannt] [local] 0 =
authentication>LOG:  Verbindung authorisiert: Benutzer=3Dpostgres =
Datenbank=3Dtemplate1
<2014-09-02 08:22:31 CEST template1 postgres psql [local] 0 idle>LOG:  =
Anweisung: SELECT pgpool_switch_xlog('/opt/backup/WAL-archive')
<2014-09-02 08:22:31 CEST template1 postgres psql [local] 0 SELECT>LOG:  =
pgpool_switch_xlog: waiting for =
"/opt/backup/WAL-archive/0000001100000048000000B8"
<2014-09-02 08:22:31 CEST template1 postgres psql [local] 0 =
SELECT>ANWEISUNG:  SELECT pgpool_switch_xlog('/opt/backup/WAL-archive')
<2014-09-02 08:22:31 CEST template1 postgres psql [local] 0 SELECT>LOG:  =
Dauer: 0.554 ms
                pgpool_switch_xlog               =20
--------------------------------------------------
 /opt/backup/WAL-archive/0000001100000048000000B8
(1 row)

+ read host

exit 0
+ exit 0
<2014-09-02 08:22:31 CEST template1 recovery [unbekannt] PGPool(38183) 0 =
SELECT>LOG:  Dauer: 1134.403 ms
<2014-09-02 08:22:31 CEST template1 recovery [unbekannt] PGPool(38183) 0 =
idle>LOG:  Anweisung: SELECT pgpool_remote_start('Node3', =
'/opt/pgsql_data')
#! /bin/sh -xv
# For Debug-information add -xv to shebang above.

export LC_MESSAGES=3Den_US.UTF-8
+ export LC_MESSAGES=3Den_US.UTF-8
+ LC_MESSAGES=3Den_US.UTF-8
SSH=3D/usr/bin/ssh=20
+ SSH=3D/usr/bin/ssh
PSQL=3D/usr/bin/psql
+ PSQL=3D/usr/bin/psql
LOGGER=3D"/bin/logger -i -p local0.info -t pgpool"=20
+ LOGGER=3D'/bin/logger -i -p local0.info -t pgpool'
BASENAME=3D$(/usr/bin/basename $0)
/usr/bin/basename $0
++ /usr/bin/basename /opt/pgsql_data/pgpool_remote_start
+ BASENAME=3Dpgpool_remote_start
ID=3D$(/usr/bin/id -un)
/usr/bin/id -un
++ /usr/bin/id -un
+ ID=3Dpostgres

SRC_DATA=3D/opt/pgsql_data
+ SRC_DATA=3D/opt/pgsql_data
DST_HOST=3D$1 # Hostname of a recovery target node.=20
+ DST_HOST=3DNode3
DST_DATA=3D$2 # Database cluster path of a recovery target node.
+ DST_DATA=3D/opt/pgsql_data

$LOGGER "Executing $BASENAME as user $ID"
+ /bin/logger -i -p local0.info -t pgpool 'Executing pgpool_remote_start =
as user postgres'

$LOGGER "Starting remote PostgreSQL server"
+ /bin/logger -i -p local0.info -t pgpool 'Starting remote PostgreSQL =
server'
$SSH -T $DST_HOST "/usr/bin/pg_ctl start -swD $DST_DATA/ -l =
$DST_DATA/postmaster.log" || { $LOGGER "Failed to remote_start =
$DST_HOST." && exit 1; }
+ /usr/bin/ssh -T Node3 '/usr/bin/pg_ctl start -swD /opt/pgsql_data/ -l =
/opt/pgsql_data/postmaster.log'

$LOGGER "Cleaning up temporary files"
+ /bin/logger -i -p local0.info -t pgpool 'Cleaning up temporary files'
rm -f $SRC_DATA/onlinerecovery.true || { $LOGGER "Failed to delete =
onlinerecovery.true" && exit 1; }
+ rm -f /opt/pgsql_data/onlinerecovery.true
rm -f /opt/pgsql_data/activeservers.lst && $LOGGER "Deleted =
activeservers.lst" || { $LOGGER "Failed to delete activeservers.lst" && =
exit 1; }
+ rm -f /opt/pgsql_data/activeservers.lst
+ /bin/logger -i -p local0.info -t pgpool 'Deleted activeservers.lst'
#rm -f /opt/backup/WAL-archive/* && $LOGGER "Cleared WAL-archive/"

# DST_xlog=3D$($PSQL -dpostgres -h$DST_HOST -Atc 'select * from =
pg_current_xlog_location()')

exit 0
+ exit 0
<2014-09-02 08:22:36 CEST template1 recovery [unbekannt] PGPool(38183) 0 =
SELECT>LOG:  Dauer: 5273.674 ms
<2014-09-02 08:25:19 CEST [unbekannt] [unbekannt] [unbekannt]  0 >LOG:  =
Verbindung empfangen: Host=3DPGPool Port=3D38187
<2014-09-02 08:25:23 CEST [unbekannt] [unbekannt] [unbekannt]  0 >LOG:  =
Verbindung empfangen: Host=3DPGPool Port=3D38190
<2014-09-02 08:25:23 CEST postgres postgres [unbekannt] PGPool(38190) 0 =
authentication>LOG:  Verbindung authorisiert: Benutzer=3Dpostgres =
Datenbank=3Dpostgres
<2014-09-02 08:25:23 CEST postgres postgres psql PGPool(38190) 0 =
idle>LOG:  Anweisung: CREATE DATABASE test;
<2014-09-02 08:25:23 CEST     0 >LOG:  checkpoint starting: immediate =
force wait
<2014-09-02 08:25:23 CEST     0 >LOG:  checkpoint complete: wrote 117 =
buffers (0.1%); 0 transaction log file(s) added, 0 removed, 2 recycled; =
write=3D0.024 s, sync=3D0.064 s, total=3D0.093 s; sync files=3D117, =
longest=3D0.063 s, average=3D0.000 s
<2014-09-02 08:25:23 CEST     0 >LOG:  checkpoint starting: immediate =
force wait
<2014-09-02 08:25:23 CEST     0 >LOG:  checkpoint complete: wrote 0 =
buffers (0.0%); 0 transaction log file(s) added, 0 removed, 1 recycled; =
write=3D0.001 s, sync=3D0.000 s, total=3D0.002 s; sync files=3D0, =
longest=3D0.000 s, average=3D0.000 s
<2014-09-02 08:25:23 CEST postgres postgres psql PGPool(38190) 0 CREATE =
DATABASE>LOG:  Dauer: 275.986 ms
<2014-09-02 08:25:23 CEST [unbekannt] [unbekannt] [unbekannt]  0 >LOG:  =
Verbindung empfangen: Host=3DNode1 Port=3D56885
<2014-09-02 08:25:23 CEST postgres postgres [unbekannt] Node1(56885) 0 =
authentication>LOG:  Verbindung authorisiert: Benutzer=3Dpostgres =
Datenbank=3Dpostgres
<2014-09-02 08:25:23 CEST postgres postgres psql Node1(56885) 0 =
idle>LOG:  Anweisung: select oid,datname from pg_database where datname =
=3D 'test';
<2014-09-02 08:25:23 CEST postgres postgres psql Node1(56885) 0 =
SELECT>LOG:  Dauer: 0.750 ms
<2014-09-02 08:25:23 CEST [unbekannt] [unbekannt] [unbekannt]  0 >LOG:  =
Verbindung empfangen: Host=3DPGPool Port=3D38193
<2014-09-02 08:25:28 CEST [unbekannt] [unbekannt] [unbekannt]  0 >LOG:  =
Verbindung empfangen: Host=3DPGPool Port=3D38196
<2014-09-02 08:25:28 CEST postgres postgres [unbekannt] PGPool(38196) 0 =
authentication>LOG:  Verbindung authorisiert: Benutzer=3Dpostgres =
Datenbank=3Dpostgres
<2014-09-02 08:25:33 CEST postgres postgres psql PGPool(38196) 0 =
idle>LOG:  Anweisung: Drop DATABASE test;
<2014-09-02 08:25:33 CEST     0 >LOG:  checkpoint starting: immediate =
force wait
<2014-09-02 08:25:33 CEST     0 >LOG:  checkpoint complete: wrote 1 =
buffers (0.0%); 0 transaction log file(s) added, 0 removed, 0 recycled; =
write=3D0.001 s, sync=3D0.001 s, total=3D0.024 s; sync files=3D1, =
longest=3D0.001 s, average=3D0.001 s
<2014-09-02 08:25:34 CEST postgres postgres psql PGPool(38196) 0 DROP =
DATABASE>LOG:  Dauer: 106.018 ms


------=_NextPart_000_0077_01CFC692.709101F0
Content-Type: application/octet-stream;
	name="Node2.log"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="Node2.log"

<2014-09-02 08:20:24 CEST [unbekannt] [unbekannt] [unbekannt]  0 >LOG:  =
Verbindung empfangen: Host=3DPGPool Port=3D37576
<2014-09-02 08:20:28 CEST [unbekannt] [unbekannt] [unbekannt]  0 >LOG:  =
Verbindung empfangen: Host=3DPGPool Port=3D37579
<2014-09-02 08:20:28 CEST postgres postgres [unbekannt] PGPool(37579) 0 =
authentication>LOG:  Verbindung authorisiert: Benutzer=3Dpostgres =
Datenbank=3Dpostgres
<2014-09-02 08:20:29 CEST postgres postgres psql PGPool(37579) 0 =
idle>LOG:  Anweisung: CREATE DATABASE test;
<2014-09-02 08:20:29 CEST     0 >LOG:  checkpoint starting: immediate =
force wait
<2014-09-02 08:20:29 CEST     0 >LOG:  checkpoint complete: wrote 3 =
buffers (0.0%); 0 transaction log file(s) added, 0 removed, 1 recycled; =
write=3D0.002 s, sync=3D0.001 s, total=3D0.015 s; sync files=3D3, =
longest=3D0.001 s, average=3D0.000 s
<2014-09-02 08:20:29 CEST     0 >LOG:  checkpoint starting: immediate =
force wait
<2014-09-02 08:20:29 CEST     0 >LOG:  checkpoint complete: wrote 0 =
buffers (0.0%); 0 transaction log file(s) added, 0 removed, 1 recycled; =
write=3D0.001 s, sync=3D0.000 s, total=3D0.003 s; sync files=3D0, =
longest=3D0.000 s, average=3D0.000 s
<2014-09-02 08:20:30 CEST postgres postgres psql PGPool(37579) 0 CREATE =
DATABASE>LOG:  Dauer: 275.030 ms
<2014-09-02 08:20:30 CEST [unbekannt] [unbekannt] [unbekannt]  0 >LOG:  =
Verbindung empfangen: Host=3DNode1 Port=3D53196
<2014-09-02 08:20:30 CEST postgres postgres [unbekannt] Node1(53196) 0 =
authentication>LOG:  Verbindung authorisiert: Benutzer=3Dpostgres =
Datenbank=3Dpostgres
<2014-09-02 08:20:30 CEST postgres postgres psql Node1(53196) 0 =
idle>LOG:  Anweisung: select oid,datname from pg_database where datname =
=3D 'test';
<2014-09-02 08:20:30 CEST postgres postgres psql Node1(53196) 0 =
SELECT>LOG:  Dauer: 1.176 ms
<2014-09-02 08:20:30 CEST [unbekannt] [unbekannt] [unbekannt]  0 >LOG:  =
Verbindung empfangen: Host=3DPGPool Port=3D37582
<2014-09-02 08:20:35 CEST [unbekannt] [unbekannt] [unbekannt]  0 >LOG:  =
Verbindung empfangen: Host=3DPGPool Port=3D37585
<2014-09-02 08:20:35 CEST postgres postgres [unbekannt] PGPool(37585) 0 =
authentication>LOG:  Verbindung authorisiert: Benutzer=3Dpostgres =
Datenbank=3Dpostgres
<2014-09-02 08:20:40 CEST postgres postgres psql PGPool(37585) 0 =
idle>LOG:  Anweisung: Drop DATABASE test;
<2014-09-02 08:20:40 CEST     0 >LOG:  checkpoint starting: immediate =
force wait
<2014-09-02 08:20:40 CEST     0 >LOG:  checkpoint complete: wrote 1 =
buffers (0.0%); 0 transaction log file(s) added, 0 removed, 0 recycled; =
write=3D0.001 s, sync=3D0.002 s, total=3D0.034 s; sync files=3D1, =
longest=3D0.002 s, average=3D0.002 s
<2014-09-02 08:20:40 CEST postgres postgres psql PGPool(37585) 0 DROP =
DATABASE>LOG:  Dauer: 106.548 ms
<2014-09-02 08:22:30 CEST [unbekannt] [unbekannt] [unbekannt]  0 >LOG:  =
Verbindung empfangen: Host=3DPGPool Port=3D37596
<2014-09-02 08:22:30 CEST postgres postgres [unbekannt] PGPool(37596) 0 =
authentication>LOG:  Verbindung authorisiert: Benutzer=3Dpostgres =
Datenbank=3Dpostgres
<2014-09-02 08:22:31 CEST [unbekannt] [unbekannt] [unbekannt]  0 >LOG:  =
Verbindung empfangen: Host=3DNode1 Port=3D53210
<2014-09-02 08:22:31 CEST template1 postgres [unbekannt] Node1(53210) 0 =
authentication>LOG:  Verbindung authorisiert: Benutzer=3Dpostgres =
Datenbank=3Dtemplate1
<2014-09-02 08:22:31 CEST template1 postgres psql Node1(53210) 0 =
idle>LOG:  Anweisung: SELECT datname FROM pg_database WHERE NOT =
datistemplate AND datallowconn
<2014-09-02 08:22:31 CEST template1 postgres psql Node1(53210) 0 =
SELECT>LOG:  Dauer: 0.796 ms
<2014-09-02 08:22:31 CEST [unbekannt] [unbekannt] [unbekannt]  0 >LOG:  =
Verbindung empfangen: Host=3DNode1 Port=3D53211
<2014-09-02 08:22:31 CEST postgres postgres [unbekannt] Node1(53211) 0 =
authentication>LOG:  Verbindung authorisiert: Benutzer=3Dpostgres =
Datenbank=3Dpostgres
<2014-09-02 08:22:31 CEST postgres postgres psql Node1(53211) 0 =
idle>LOG:  Anweisung: SELECT setval(oid, nextval(oid)) FROM pg_class =
WHERE relkind =3D 'S'
<2014-09-02 08:22:31 CEST postgres postgres psql Node1(53211) 0 =
SELECT>LOG:  Dauer: 0.855 ms
<2014-09-02 08:22:31 CEST [unbekannt] [unbekannt] [unbekannt]  0 >LOG:  =
Verbindung empfangen: Host=3DNode1 Port=3D53212
<2014-09-02 08:22:31 CEST sospos postgres [unbekannt] Node1(53212) 0 =
authentication>LOG:  Verbindung authorisiert: Benutzer=3Dpostgres =
Datenbank=3Dsospos
<2014-09-02 08:22:31 CEST sospos postgres psql Node1(53212) 0 idle>LOG:  =
Anweisung: SELECT setval(oid, nextval(oid)) FROM pg_class WHERE relkind =
=3D 'S'
<2014-09-02 08:22:31 CEST sospos postgres psql Node1(53212) 0 =
SELECT>LOG:  Dauer: 6.497 ms
<2014-09-02 08:22:31 CEST [unbekannt] [unbekannt] [unbekannt]  0 >LOG:  =
Verbindung empfangen: Host=3DNode1 Port=3D53213
<2014-09-02 08:22:31 CEST regin postgres [unbekannt] Node1(53213) 0 =
authentication>LOG:  Verbindung authorisiert: Benutzer=3Dpostgres =
Datenbank=3Dregin
<2014-09-02 08:22:31 CEST regin postgres psql Node1(53213) 0 idle>LOG:  =
Anweisung: SELECT setval(oid, nextval(oid)) FROM pg_class WHERE relkind =
=3D 'S'
<2014-09-02 08:22:31 CEST regin postgres psql Node1(53213) 0 SELECT>LOG: =
 Dauer: 0.862 ms
<2014-09-02 08:25:19 CEST [unbekannt] [unbekannt] [unbekannt]  0 >LOG:  =
Verbindung empfangen: Host=3DPGPool Port=3D37599
<2014-09-02 08:25:23 CEST [unbekannt] [unbekannt] [unbekannt]  0 >LOG:  =
Verbindung empfangen: Host=3DPGPool Port=3D37602
<2014-09-02 08:25:23 CEST postgres postgres [unbekannt] PGPool(37602) 0 =
authentication>LOG:  Verbindung authorisiert: Benutzer=3Dpostgres =
Datenbank=3Dpostgres
<2014-09-02 08:25:23 CEST postgres postgres psql PGPool(37602) 0 =
idle>LOG:  Anweisung: CREATE DATABASE test;
<2014-09-02 08:25:23 CEST     0 >LOG:  checkpoint starting: immediate =
force wait
<2014-09-02 08:25:24 CEST     0 >LOG:  checkpoint complete: wrote 117 =
buffers (0.1%); 0 transaction log file(s) added, 0 removed, 0 recycled; =
write=3D0.004 s, sync=3D0.051 s, total=3D0.060 s; sync files=3D117, =
longest=3D0.050 s, average=3D0.000 s
<2014-09-02 08:25:24 CEST     0 >LOG:  checkpoint starting: immediate =
force wait
<2014-09-02 08:25:24 CEST     0 >LOG:  checkpoint complete: wrote 0 =
buffers (0.0%); 0 transaction log file(s) added, 0 removed, 2 recycled; =
write=3D0.001 s, sync=3D0.000 s, total=3D0.002 s; sync files=3D0, =
longest=3D0.000 s, average=3D0.000 s
<2014-09-02 08:25:24 CEST postgres postgres psql PGPool(37602) 0 CREATE =
DATABASE>LOG:  Dauer: 299.780 ms
<2014-09-02 08:25:24 CEST [unbekannt] [unbekannt] [unbekannt]  0 >LOG:  =
Verbindung empfangen: Host=3DNode1 Port=3D53218
<2014-09-02 08:25:24 CEST postgres postgres [unbekannt] Node1(53218) 0 =
authentication>LOG:  Verbindung authorisiert: Benutzer=3Dpostgres =
Datenbank=3Dpostgres
<2014-09-02 08:25:24 CEST postgres postgres psql Node1(53218) 0 =
idle>LOG:  Anweisung: select oid,datname from pg_database where datname =
=3D 'test';
<2014-09-02 08:25:24 CEST postgres postgres psql Node1(53218) 0 =
SELECT>LOG:  Dauer: 0.805 ms
<2014-09-02 08:25:24 CEST [unbekannt] [unbekannt] [unbekannt]  0 >LOG:  =
Verbindung empfangen: Host=3DPGPool Port=3D37605
<2014-09-02 08:25:29 CEST [unbekannt] [unbekannt] [unbekannt]  0 >LOG:  =
Verbindung empfangen: Host=3DPGPool Port=3D37608
<2014-09-02 08:25:29 CEST postgres postgres [unbekannt] PGPool(37608) 0 =
authentication>LOG:  Verbindung authorisiert: Benutzer=3Dpostgres =
Datenbank=3Dpostgres
<2014-09-02 08:25:34 CEST postgres postgres psql PGPool(37608) 0 =
idle>LOG:  Anweisung: Drop DATABASE test;
<2014-09-02 08:25:34 CEST     0 >LOG:  checkpoint starting: immediate =
force wait
<2014-09-02 08:25:34 CEST     0 >LOG:  checkpoint complete: wrote 1 =
buffers (0.0%); 0 transaction log file(s) added, 0 removed, 0 recycled; =
write=3D0.001 s, sync=3D0.001 s, total=3D0.008 s; sync files=3D1, =
longest=3D0.001 s, average=3D0.001 s
<2014-09-02 08:25:34 CEST postgres postgres psql PGPool(37608) 0 DROP =
DATABASE>LOG:  Dauer: 105.865 ms

------=_NextPart_000_0077_01CFC692.709101F0
Content-Type: application/octet-stream;
	name="Node3.log"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="Node3.log"

<2014-09-02 08:22:32 CEST     0 >LOG:  Datenbanksystem wurde =
unterbrochen; letzte bekannte Aktion am 2014-09-02 08:21:15 CEST
<2014-09-02 08:22:32 CEST [unbekannt] [unbekannt] [unbekannt]  0 >LOG:  =
Verbindung empfangen: Host=3D[local]
<2014-09-02 08:22:32 CEST postgres postgres [unbekannt] [local] 0 =
>FATAL:  das Datenbanksystem startet
scp: /opt/backup/WAL-archive/00000011.history: No such file or directory
<2014-09-02 08:22:33 CEST     0 >LOG:  starte Wiederherstellung aus =
Archiv
<2014-09-02 08:22:33 CEST     0 >LOG:  Logdatei =
=C2=BB0000001100000048000000B6=C2=AB aus Archiv wiederhergestellt
<2014-09-02 08:22:33 CEST [unbekannt] [unbekannt] [unbekannt]  0 >LOG:  =
Verbindung empfangen: Host=3D[local]
<2014-09-02 08:22:33 CEST postgres postgres [unbekannt] [local] 0 =
>FATAL:  das Datenbanksystem startet
<2014-09-02 08:22:33 CEST     0 >LOG:  konsistenter =
Wiederherstellungszustand erreicht bei 48/B6000020
<2014-09-02 08:22:33 CEST     0 >LOG:  Redo beginnt bei 48/B6000020
<2014-09-02 08:22:33 CEST     0 >LOG:  Logdatei =
=C2=BB0000001100000048000000B7=C2=AB aus Archiv wiederhergestellt
<2014-09-02 08:22:34 CEST     0 >LOG:  Logdatei =
=C2=BB0000001100000048000000B8=C2=AB aus Archiv wiederhergestellt
scp: /opt/backup/WAL-archive/0000001100000048000000B9: No such file or =
directory
<2014-09-02 08:22:34 CEST     0 >LOG:  konnte Datei =
=C2=BBpg_xlog/0000001100000048000000B9=C2=AB nicht =C3=B6ffnen (Logdatei =
72, Segment 185): Datei oder Verzeichnis nicht gefunden
<2014-09-02 08:22:34 CEST     0 >LOG:  Redo fertig bei 48/B800AC28
<2014-09-02 08:22:34 CEST [unbekannt] [unbekannt] [unbekannt]  0 >LOG:  =
Verbindung empfangen: Host=3D[local]
<2014-09-02 08:22:34 CEST postgres postgres [unbekannt] [local] 0 =
>FATAL:  das Datenbanksystem startet
<2014-09-02 08:22:34 CEST     0 >LOG:  Logdatei =
=C2=BB0000001100000048000000B8=C2=AB aus Archiv wiederhergestellt
scp: /opt/backup/WAL-archive/00000012.history: No such file or directory
scp: /opt/backup/WAL-archive/00000013.history: No such file or directory
scp: /opt/backup/WAL-archive/00000014.history: No such file or directory
scp: /opt/backup/WAL-archive/00000015.history: No such file or directory
scp: /opt/backup/WAL-archive/00000016.history: No such file or directory
<2014-09-02 08:22:35 CEST     0 >LOG:  gew=C3=A4hlte neue Timeline-ID: =
22
scp: /opt/backup/WAL-archive/00000011.history: No such file or directory
<2014-09-02 08:22:35 CEST [unbekannt] [unbekannt] [unbekannt]  0 >LOG:  =
Verbindung empfangen: Host=3D[local]
<2014-09-02 08:22:35 CEST postgres postgres [unbekannt] [local] 0 =
>FATAL:  das Datenbanksystem startet
<2014-09-02 08:22:35 CEST     0 >LOG:  Wiederherstellung aus Archiv =
abgeschlossen
<2014-09-02 08:22:35 CEST     0 >LOG:  checkpoint starting: =
end-of-recovery immediate wait
<2014-09-02 08:22:35 CEST     0 >LOG:  checkpoint complete: wrote 114 =
buffers (0.1%); 0 transaction log file(s) added, 0 removed, 0 recycled; =
write=3D0.003 s, sync=3D0.066 s, total=3D0.115 s; sync files=3D114, =
longest=3D0.065 s, average=3D0.000 s
<2014-09-02 08:22:35 CEST     0 >LOG:  Datenbanksystem ist bereit, um =
Verbindungen anzunehmen
<2014-09-02 08:22:35 CEST     0 >LOG:  Autovacuum-Launcher startet
<2014-09-02 08:22:36 CEST [unbekannt] [unbekannt] [unbekannt]  0 >LOG:  =
Verbindung empfangen: Host=3D[local]
<2014-09-02 08:22:36 CEST postgres postgres [unbekannt] [local] 0 =
authentication>LOG:  Verbindung authorisiert: Benutzer=3Dpostgres =
Datenbank=3Dpostgres
<2014-09-02 08:22:36 CEST [unbekannt] [unbekannt] [unbekannt]  0 >LOG:  =
Verbindung empfangen: Host=3DPGPool Port=3D53541
<2014-09-02 08:22:36 CEST postgres recovery [unbekannt] PGPool(53541) 0 =
authentication>LOG:  Verbindung authorisiert: Benutzer=3Drecovery =
Datenbank=3Dpostgres
<2014-09-02 08:25:19 CEST [unbekannt] [unbekannt] [unbekannt]  0 >LOG:  =
Verbindung empfangen: Host=3DPGPool Port=3D53544
<2014-09-02 08:25:23 CEST [unbekannt] [unbekannt] [unbekannt]  0 >LOG:  =
Verbindung empfangen: Host=3DPGPool Port=3D53547
<2014-09-02 08:25:23 CEST postgres postgres [unbekannt] PGPool(53547) 0 =
authentication>LOG:  Verbindung authorisiert: Benutzer=3Dpostgres =
Datenbank=3Dpostgres
<2014-09-02 08:25:23 CEST postgres postgres psql PGPool(53547) 0 =
idle>LOG:  Anweisung: CREATE DATABASE test;
<2014-09-02 08:25:23 CEST     0 >LOG:  checkpoint starting: immediate =
force wait
<2014-09-02 08:25:23 CEST     0 >LOG:  checkpoint complete: wrote 3 =
buffers (0.0%); 0 transaction log file(s) added, 0 removed, 1 recycled; =
write=3D0.073 s, sync=3D0.001 s, total=3D0.080 s; sync files=3D3, =
longest=3D0.001 s, average=3D0.000 s
<2014-09-02 08:25:23 CEST     0 >LOG:  checkpoint starting: immediate =
force wait
<2014-09-02 08:25:23 CEST     0 >LOG:  checkpoint complete: wrote 0 =
buffers (0.0%); 0 transaction log file(s) added, 0 removed, 3 recycled; =
write=3D0.001 s, sync=3D0.000 s, total=3D0.002 s; sync files=3D0, =
longest=3D0.000 s, average=3D0.000 s
<2014-09-02 08:25:23 CEST postgres postgres psql PGPool(53547) 0 CREATE =
DATABASE>LOG:  Dauer: 275.316 ms
<2014-09-02 08:25:23 CEST [unbekannt] [unbekannt] [unbekannt]  0 >LOG:  =
Verbindung empfangen: Host=3DNode1 Port=3D39175
<2014-09-02 08:25:23 CEST postgres postgres [unbekannt] Node1(39175) 0 =
authentication>LOG:  Verbindung authorisiert: Benutzer=3Dpostgres =
Datenbank=3Dpostgres
<2014-09-02 08:25:23 CEST postgres postgres psql Node1(39175) 0 =
idle>LOG:  Anweisung: select oid,datname from pg_database where datname =
=3D 'test';
<2014-09-02 08:25:23 CEST postgres postgres psql Node1(39175) 0 =
SELECT>LOG:  Dauer: 74.628 ms
<2014-09-02 08:25:23 CEST [unbekannt] [unbekannt] [unbekannt]  0 >LOG:  =
Verbindung empfangen: Host=3DPGPool Port=3D53550
<2014-09-02 08:25:28 CEST [unbekannt] [unbekannt] [unbekannt]  0 >LOG:  =
Verbindung empfangen: Host=3DPGPool Port=3D53553
<2014-09-02 08:25:28 CEST postgres postgres [unbekannt] PGPool(53553) 0 =
authentication>LOG:  Verbindung authorisiert: Benutzer=3Dpostgres =
Datenbank=3Dpostgres
<2014-09-02 08:25:33 CEST postgres postgres psql PGPool(53553) 0 =
idle>LOG:  Anweisung: Drop DATABASE test;
<2014-09-02 08:25:33 CEST     0 >LOG:  checkpoint starting: immediate =
force wait
<2014-09-02 08:25:33 CEST     0 >LOG:  checkpoint complete: wrote 1 =
buffers (0.0%); 0 transaction log file(s) added, 0 removed, 1 recycled; =
write=3D0.001 s, sync=3D0.001 s, total=3D0.007 s; sync files=3D1, =
longest=3D0.001 s, average=3D0.001 s
<2014-09-02 08:25:34 CEST postgres postgres psql PGPool(53553) 0 DROP =
DATABASE>LOG:  Dauer: 105.128 ms

------=_NextPart_000_0077_01CFC692.709101F0
Content-Type: text/plain;
	name="synctest.txt"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="synctest.txt"

#########################################################################=
# synctest before recovery

Node1:~ # ./synctest.sh
#! /bin/sh -xv

psql -hPGPool -dpostgres -Upostgres -c 'CREATE DATABASE test;'
+ psql -hPGPool -dpostgres -Upostgres -c 'CREATE DATABASE test;'
CREATE DATABASE
psql -hNode1 -dpostgres -Upostgres -c "select oid,* from pg_database =
where datname =3D 'test';"
+ psql -hNode1 -dpostgres -Upostgres -c 'select oid,* from pg_database =
where datname =3D '\''test'\'';'
   oid    | datname
----------+---------
 27427406 | test
(1 row)

psql -hNode2 -dpostgres -Upostgres -c "select oid,datname from =
pg_database where datname =3D 'test';"
+ psql -hNode2 -dpostgres -Upostgres -c 'select oid,datname from =
pg_database where datname =3D '\''test'\'';'
   oid    | datname
----------+---------
 27427406 | test

psql -hNode3 -dpostgres -Upostgres -c "select oid,* from pg_database =
where datname =3D 'test';"
+ psql -hNode3 -dpostgres -Upostgres -c 'select oid,* from pg_database =
where datname =3D '\''test'\'';'
   oid    | datname
----------+---------
 27435591 | test
(1 row)

psql -hPGPool -dpostgres -Upostgres -c 'Drop DATABASE test;'
+ psql -hPGPool -dpostgres -Upostgres -c 'Drop DATABASE test;'
DROP DATABASE




#########################################################################=
# synctest after recovery

Node1:~ # ./synctest.sh
#! /bin/sh -xv

psql -hPGPool -dpostgres -Upostgres -c 'CREATE DATABASE test;'
+ psql -hPGPool -dpostgres -Upostgres -c 'CREATE DATABASE test;'
CREATE DATABASE
psql -hNode1 -dpostgres -Upostgres -c "select oid,datname from =
pg_database where datname =3D 'test';"
+ psql -hNode1 -dpostgres -Upostgres -c 'select oid,datname from =
pg_database where datname =3D '\''test'\'';'
   oid    | datname
----------+---------
 27427407 | test
(1 row)

psql -hNode2 -dpostgres -Upostgres -c "select oid,datname from =
pg_database where datname =3D 'test';"
+ psql -hNode2 -dpostgres -Upostgres -c 'select oid,datname from =
pg_database where datname =3D '\''test'\'';'
   oid    | datname
----------+---------
 27427407 | test
 (1 row)

psql -hNode3 -dpostgres -Upostgres -c "select oid,datname from =
pg_database where datname =3D 'test';"
+ psql -hNode3 -dpostgres -Upostgres -c 'select oid,datname from =
pg_database where datname =3D '\''test'\'';'
   oid    | datname
----------+---------
 27435587 | test
(1 row)

psql -hPGPool -dpostgres -Upostgres -c 'Drop DATABASE test;'
+ psql -hPGPool -dpostgres -Upostgres -c 'Drop DATABASE test;'
DROP DATABASE

------=_NextPart_000_0077_01CFC692.709101F0--



More information about the pgpool-general mailing list