On Thu, Aug 4, 2016 at 4:03 PM, Michael Paquier
<michael.paquier@gmail.com> wrote:
> This window exists as well on back-branches btw, this is not new to
> 9.6. Magnus, what do you think?
Actually, a completely water-proof solution is to use an in-memory
flag proper to exclusive backups during the time pg_start_backup() is
called, at the cost of taking WALInsertLockAcquireExclusive once again
at the end of do_pg_start_backup(), but it seems to me that it is an
acceptable cost because pg_start_backup is not a hot code path. Using
a separate flag has the advantage to provide to the user a better
error message when pg_stop_backup is used while pg_start_backup is
running as well.
Andreas, with the patch attached is the assertion still triggered?
Thoughts from others are welcome as well.
--
Michael