Re: wal logs in pg_xlog

Поиск
Список
Период
Сортировка
Искать
От
Jeff Frost
Тема
Re: wal logs in pg_xlog
Дата
Msg-id
Pine.LNX.4.63.0506290805480.10306@discord.dyndns.org
Ответ на
Re: wal logs in pg_xlog (Nasir Iqbal Danish)
Список
Дерево обсуждения
listening on tcp socket instead of unix domain David Bear <David.Bear@asu.edu>
Re: listening on tcp socket instead of unix domain Tom Lane <tgl@sss.pgh.pa.us>
wal logs in pg_xlog Nasir Iqbal Danish <nasir@amaana.com>
Re: wal logs in pg_xlog Michael Fuhr <mike@fuhr.org>
Re: wal logs in pg_xlog Nasir Iqbal Danish <nasir@amaana.com>
Re: wal logs in pg_xlog Jeff Frost <jeff@frostconsultingllc.com>
On Tue, 28 Jun 2005, Nasir Iqbal Danish wrote:

> Please provide me if u can some script to identify which one is latest file 
> so that I can copy this to some other place.
> One more question. Is there a way to build or configure the database server 
> to replicate pg_xlogs ?

I use this fairly simple method:

LASTLOG=`ls -rt /pg_xlog/ | grep -v "backup\|archive" | tail -1`

There might be something more elegant.  I also use the following method to get 
rid of archived wal files that are older than the oldest base backup I am 
keeping:

OLDESTFILE=$PITRBASEDIR/`ls -t $PITRBASEDIR | tail -1`/backup_label

if [ -f $OLDESTFILE ]; then
 	/usr/bin/find $PITRDESTDIR -type f -not -newer $OLDESTFILE \
 		-exec rm -f \{\} \;
fi

Your mileage may vary, but it appears to work for me.

-- 
Jeff Frost, Owner 	
Frost Consulting, LLC 	http://www.frostconsultingllc.com/
Phone: 650-780-7908	FAX: 650-649-1954
В списке pgsql-admin по дате отправления
От: Leander Gillard
Дата:
От: jehan procaccia
Дата:
FAQ