On 03.10.2012 18:15, Amit Kapila wrote:
> On Tuesday, October 02, 2012 4:21 PM Heikki Linnakangas wrote:
>> Hmm, should a base backup be aborted when the standby is promoted? Does
>> the promotion render the backup corrupt?
> I think currently it does so. Pls refer
> do_pg_stop_backup(char *labelfile, bool waitforarchive)
> if (strcmp(backupfrom, "standby") == 0&& !backup_started_in_recovery)
> errmsg("the standby was promoted during
> online backup"),
> errhint("This means that the backup being
> taken is corrupt "
> "and should not be used. "
> "Try taking another online
Okay. I think that check in do_pg_stop_backup() actually already ensures
that you don't end up with a corrupt backup, even if the standby is
promoted while a backup is being taken. Admittedly it would be nicer to
abort it immediately rather than error out at the end.
But I wonder why promoting a standby renders the backup invalid in the
first place? Fujii, Simon, can you explain that?
In response to
pgsql-hackers by date
|Next:||From: Amit kapila||Date: 2012-10-04 10:12:30|
|Subject: Re: BUG #7534: walreceiver takes long time to detect n/w
|Previous:||From: Heikki Linnakangas||Date: 2012-10-04 07:24:19|
|Subject: Re: Re: [WIP] Performance Improvement by reducing WAL for