Re: Online base backup from the hot-standby

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: Online base backup from the hot-standby
Дата
Msg-id 4DDF7F02.2050004@enterprisedb.com
обсуждение исходный текст
Ответ на Online base backup from the hot-standby  (Jun Ishiduka <ishizuka.jun@po.ntts.co.jp>)
Ответы Re: Online base backup from the hot-standby
Список pgsql-hackers
On 27.05.2011 09:09, Jun Ishiduka wrote:
>   STEP1: Make startup process to acquire backup-end-position from
>          not only backup-end record but also backup-history-file .
>            * startup process allows to acquire backup-end-position
>              from backup-history-file .
>            * When pg_basebackup is executed , backup-history-file is
>              sent to the designated backup server .

I don't much like that approach. The standby would need to be able to
write the backup history file to the archive at the end of backup, and
we'd have to reintroduce the code to fetch it from archive and, when
streaming, from the master. At the moment, the archiver doesn't even run
in the standby.

I think we'll need to write the end-of-backup location somewhere in the
base backup instead. pg_stop_backup() already returns it, the client
just needs to store it somewhere with the base backup. So I'm thinking
that the procedure for taking a base backup from slave would look
something like this:

1. psql postgres -c "SELECT pg_start_backup('label')";
2. tar cvzf basebackup.tar.gz $PGDATA
3. psql postgres -c "SELECT pg_stop_backup()"; > backup_end_location
4. (keep backup_end_location alongside basebackup.tar.gz)

Or, we can just document that the control file must be backed up *last*,
so that the minimum recovery point in the control file serves the same
purposes as the end-of-backup location.

--  Heikki Linnakangas EnterpriseDB   http://www.enterprisedb.com


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

Предыдущее
От: Noah Misch
Дата:
Сообщение: Re: switch UNLOGGED to LOGGED
Следующее
От: Peter Geoghegan
Дата:
Сообщение: Re: kill -KILL: What happens?