Re: Contents of "backup_label" and "*.backup" in pg_wal location

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Contents of "backup_label" and "*.backup" in pg_wal location
Дата
Msg-id CAB7nPqR8ed4mQR9i0RPzTRTZ2srtpxtN6gL05stssY1-yrCOfQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Contents of "backup_label" and "*.backup" in pg_wal location  (Venkata B Nagothi <nag1010@gmail.com>)
Ответы Re: Contents of "backup_label" and "*.backup" in pg_wal location
Список pgsql-hackers
On Fri, Nov 4, 2016 at 7:04 PM, Venkata B Nagothi <nag1010@gmail.com> wrote:
> Sure. I will look at the possibility of using XLOG_BACKUP_END in my patch.
> I am looking at the possibility of keeping the backup_label at source until
> pg_stop_backup()
> is executed and then write the STOP information and then move it across to
> the backup location.

Non-exclusive backups already do that, except that as the backup is
already stopped at the moment the backup_label information is sent
back to the caller, and it is expected that it will be the caller that
will write its contents into the backed up PGDATA in a file named as
backup_label. Anyway, any design in this area for exclusive backups
would be really inconsistent. For example take the case of
pg_start_backup -> cp -> pg_stop_backup for an exclusive backup, when
are you going to update the backup_label file with the stop info?

> I see that when the START/STOP information is written to the WAL history
> file,
> the content from the backup_label file is being copied and I am thinking to
> do the same other way around.
>
> Am i making sense ? is that anyway not possible ?
>
> If this makes sense, then i would start working on an optimal design and
> look at the possibility of achieving this.

Before writing any code, I would be curious about the need behind
that, and you give no reason where this would help in this thread. Do
you actually want to time the timestamp when backup ends? This could
be added as a new field of pg_stop_backup for both the exclusive and
non-exclusive cases. Just an idea.
-- 
Michael



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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: Proposal for changes to recovery.conf API
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: Proposal for changes to recovery.conf API