From: | Andres Freund <andres(at)2ndquadrant(dot)com> |
---|---|
To: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com> |
Cc: | PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Soften pg_[start|stop]_backup to allow them on a standby? |
Date: | 2014-01-14 12:54:42 |
Message-ID: | 20140114125442.GA8537@awork2.anarazel.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
On 2014-01-14 12:31:09 +0900, Michael Paquier wrote:
> Currently, pg_start_backup and pg_stop_backup cannot run on a standby
> because it is not possible to write a backup_label file to disk,
> because of the nature of a standby server preventing to write any data
> in its PGDATA. Is this thought right? This is what the comments at the
> top of do_pg_start_backup make me conclude.
No, the actual reason is that a plain pg_stop_backup() writes WAL -
which we can't do on a standby. The walsender command gets around this
by storing the required data in the backup label itself, but that
requires the label to be written after the basebackup actually finished
which doesn't work for plain start/stop backup.
> Another idea would be to send the backup label file directly as the
> output of pg_start_backup such as client application can grab it and
> reuse it. Any thoughts about that as well?
Yea, I think extending the "protocols" available is the way to go
here. We need to be able to send the backup label after the actual base
backup finished.
Greetings,
Andres Freund
--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2014-01-14 12:58:49 | Re: Extending BASE_BACKUP in replication protocol: incremental backup and backup format |
Previous Message | Michael Paquier | 2014-01-14 12:47:43 | Extending BASE_BACKUP in replication protocol: incremental backup and backup format |