Re: [HACKERS] Assertion failure when the non-exclusive pg_stop_backup aborted.
От | Masahiko Sawada |
---|---|
Тема | Re: [HACKERS] Assertion failure when the non-exclusive pg_stop_backup aborted. |
Дата | |
Msg-id | CAD21AoA6SXdPy6gEVd1SicuRNxQeyJkkkLj5HV6nUgm1o-M+DA@mail.gmail.com обсуждение исходный текст |
Ответ на | [HACKERS] Assertion failure when the non-exclusive pg_stop_backup aborted. (Masahiko Sawada <sawada.mshk@gmail.com>) |
Ответы |
Re: [HACKERS] Assertion failure when the non-exclusive pg_stop_backup aborted.
|
Список | pgsql-hackers |
Thank you for the reviewing!
On Nov 15, 2017 2:59 AM, "Fujii Masao" <masao.fujii@gmail.com> wrote:
On Fri, Sep 22, 2017 at 4:42 PM, Masahiko Sawada <sawada.mshk@gmail.com> wrote:
> On Fri, Sep 22, 2017 at 3:46 PM, Michael Paquier
> <michael.paquier@gmail.com> wrote:
>> On Fri, Sep 22, 2017 at 3:24 PM, Masahiko Sawada <sawada.mshk@gmail.com> wrote:
>>> I have a question. Since WALInsertLockRelease seems not to call
>>> LWLockWaitForVar I thought you wanted to mean LWLockReleaseClearVar
>>> instead, is that right?
>>
>> This looks like a copy-pasto from my side. Thanks for spotting it.
>
> Okay, attached the latest version patch.+ /* Quick exit if we have done the backup */This quick exit seems to cause another problem. Please imagine the
+ if (XLogCtl->Insert.exclusiveBackupState == EXCLUSIVE_BACKUP_NONE)
+ return;
case where there is no exclusive backup running, a backend starts
non-exclusive backup and is terminated before calling pg_stop_backup().
In this case, do_pg_abort_backup() should decrement
XLogCtl->Insert.nonExclusiveBackups, but, with the patch, because of
the above quick exit, do_pg_abort_backup() fails to decrement that.
Hmm, I think that in this case because exclusiveBackupState is not EXCLUSIVE_BACKUP_NONE, nonExclusiveBackups is surely decremented. Am I missing something?
Regards,
--
Masahiko Sawada
В списке pgsql-hackers по дате отправления: