Re: archive_command

Поиск
Список
Период
Сортировка
От Jeff Frost
Тема Re: archive_command
Дата
Msg-id Pine.LNX.4.64.0510151021130.31923@discord.dyndns.org
обсуждение исходный текст
Ответ на Re: archive_command  (Gaetano Mendola <mendola@bigfoot.com>)
Список pgsql-admin
Looks like using that FILE= expression, I ended up with a bad file choice last
night immediately after the base backup:

Copying 0000000100000015000000F8.0088A490.backup to
/mnt/pgbackup/pitr/0000000100000015000000F8.0088A490.backup

Also, I noticed that rsync had a file disappear out from under it during the
base backup:

file has vanished: "/usr/local/pgsql/data/pg_subtrans/0743"

So, I have modified my FILE= expression to the following:

FILE=`ls -tp /pg_xlog/ | grep -v "backup\|/" | head -1`

Which gives me this file: 00000001000000160000002A

Given these in the pg_xlog dir.

00000001000000160000002A
00000001000000160000002B
00000001000000160000002C
00000001000000160000002D
00000001000000160000002E
00000001000000160000002F
000000010000001600000030
000000010000001600000031

Removing the -t takes yields the same result as long as I grep out the .backup
files.


On Tue, 4 Oct 2005, Gaetano Mendola wrote:

> This was the function I used to find the WAL in use:
>
> function copy_last_wal
> {
>    FILE=$( ls -t1p $PGXLOG | grep -v / | head -1 )
>
>    echo "Last Wal> " $FILE
>
>    cp ${PGXLOG}/${FILE} ${PARTIAL}/${FILE}.tmp
>    mv ${PARTIAL}/${FILE}.tmp ${PARTIAL}/${FILE}.partial
>    find ${PARTIAL} -name *.partial | grep -v ${FILE} | xargs -i rm -fr {}
> }
>

--
Jeff Frost, Owner     <jeff@frostconsultingllc.com>
Frost Consulting, LLC     http://www.frostconsultingllc.com/
Phone: 650-780-7908    FAX: 650-649-1954

В списке pgsql-admin по дате отправления:

Предыдущее
От: teknet@poczta.onet.pl
Дата:
Сообщение: scripts and ~/.psqlrc
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: scripts and ~/.psqlrc