Re: Why so long between archive calls?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Why so long between archive calls?
Дата
Msg-id 581.1157670679@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Why so long between archive calls?  ("Chris Hoover" <revoohc@gmail.com>)
Список pgsql-admin
"Chris Hoover" <revoohc@gmail.com> writes:
> I am able to tell how far behind the archiving is running since every
> minute, I copy the current archive_logs to a backup directory.  This is
> allowing me to be able to do an up to the minute pitr if required.  The
> archive_command removes the file from this backup dir when the file is
> archived by PostgreSQL.

> Here my script for that:

It looks to me like your script does not understand the difference
between xlog files that have been used and xlog files that haven't been
used yet.  Since you've got checkpoint_segments = 256, the xlog code
will allow as many as 513 (2*checkpoint_segments+1) not-yet-used xlog
files to be allocated.

The only simple way to tell where the end of WAL is at the moment is to
look for the xlog file with the latest mod time.  (There'll be more
support for this in 8.2.)  Any files with names numerically larger than
that one are just sitting there waiting to be used, they are not
interesting for archiving purposes.

            regards, tom lane

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

Предыдущее
От: "Chris Hoover"
Дата:
Сообщение: Re: Why so long between archive calls?
Следующее
От: pgsql.maricau@a-bc.net
Дата:
Сообщение: dynamic or static