pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedwarm database.
2+ messages / 2 participants
[nested] [flat]
* warm database.
@ 2008-02-13 05:21 Praveen Kumar (TUV) <praveen.k@renaissance-it.com>
2008-02-13 05:36 ` Re: warm database. David Wall <david.wall@yozons.com>
0 siblings, 1 reply; 2+ messages in thread
From: Praveen Kumar \(TUV\) @ 2008-02-13 05:21 UTC (permalink / raw)
To: pgsql-admin
Hello,
I am planning to make setup for warm standby databae in postgres. But I
am facing problem when I try to apply WAL files using shell scripts
restore.sh.
After applying exiting WAL file in archive directory, it does not wait
for next WAL files and come out and write the message in database
logfile which show that
Archive recovery is completed.Now system is ready for use.
I check this restore.sh file and tried to debug which show syntax
error in below mentioned line.
Can anybody tell me why it is showing syntax error and why it is not
waiting for next WAL files
Restore.sh
#!/bin/bash
RESTORE_FROM=$1
RESTORE_TO=$2
DELAY=100000
TRIGGERED=0
TRIGGER_FILE="/home/backup/trigger"
copyfunc() {
if [ "$TRIGGERED" -eq "0" ]; then
cp -v -i $RESTORE_FROM $RESTORE_TO
fi
}
k=`expr $1 : '.*\(history\)'` ------------this is the line which show
syntax error
if [ "$k" == "history" ]; then
copyfunc;
exit $?;
fi
while [ ! -f "$RESTORE_FROM" -a "$TRIGGERED" -eq "0" ]; do
usleep $DELAY;
if [ -e $TRIGGER_FILE ]; then
TRIGGERED=1;
fi
done
copyfunc;
when I debug this script through command sh -x restore.sh
it show like that.
+ RESTORE_FROM=
+ RESTORE_TO=
+ DELAY=100000
+ TRIGGERED=0
+ TRIGGER_FILE=/home/backup/trigger
++ expr : '.*\(history\)'
expr: syntax error
+ k=
+ '[' '' == backup ']'
+ '[' '!' -f '' -a 0 -eq 0 ']'
+ usleep 100000
+ '[' -e /home/backup/trigger ']'
+ TRIGGERED=1
+ '[' '!' -f '' -a 1 -eq 0 ']'
+ copyfunc
+ '[' 1 -eq 0 ']'
Praveen kumar DBA -Delivery
E-mail: praveen.k@renaissance-it.com | Extn: 1607
Sobha Renaissance Information Technology (P) Ltd.
An SEI-CMM, P-CMM & SSE-CMM Level 5 Company | BS ISO/IEC 27001:2005 &
ISO 9001:2000 Certified
A Top 50 Fast Growing Technology Company (Deloitte, 2006 & 2007) | A Six
Sigma Practice Company
Phone: + 91 80 41951999 | Fax: + 91 80 41523300
URL: www.renaissance-it.com
<file:///C:\Documents%20and%20Settings\praveen.k\Application%20Data\Micr
osoft\Local%20Settings\Temporary%20Internet%20Files\Content.Outlook\UXU0
OG4I\www.renaissance-it.com> | Video Conference: + 91 80 41252222
The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material. Any review, re-transmission, dissemination or other use of, or
taking of any action in reliance upon this information by persons or
entities other than the intended recipient is prohibited. If you
received this in error, please contact the sender and delete all copies
from any computer.
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: warm database.
2008-02-13 05:21 warm database. Praveen Kumar (TUV) <praveen.k@renaissance-it.com>
@ 2008-02-13 05:36 ` David Wall <david.wall@yozons.com>
0 siblings, 0 replies; 2+ messages in thread
From: David Wall @ 2008-02-13 05:36 UTC (permalink / raw)
To: pgsql-admin
Without worrying about debugging your script, have you considered using
pg_standby that's in contrib? It works well and you don't have to fuss
with scripts unless you're doing something special.
David
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2008-02-13 05:36 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2008-02-13 05:21 warm database. Praveen Kumar (TUV) <praveen.k@renaissance-it.com>
2008-02-13 05:36 ` David Wall <david.wall@yozons.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox