Re: [HACKERS] Assertion failure when the non-exclusive pg_stop_backup aborted.

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: [HACKERS] Assertion failure when the non-exclusive pg_stop_backup aborted.
Дата
Msg-id CAB7nPqRLxYuu8ZwkRbX14+2DW30qJkBFOMJtMULsDCLtHFM6Kw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [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
On Thu, Nov 16, 2017 at 10:57 AM, Masahiko Sawada <sawada.mshk@gmail.com> wrote:
> Agreed. Attached the updated patch, please review it.

+   /*
+    * Quick exit if session is not keeping around a non-exclusive backup
+    * already started.
+    */
+   if (sessionBackupState != SESSION_BACKUP_NON_EXCLUSIVE)
+       return;
I think that it would be more solid to use SESSION_BACKUP_NONE for the
comparison, and complete the assertion after the quick exit as follows
as this code path should never be taken for an exclusive backup:
+   Assert(XLogCtl->Insert.nonExclusiveBackups > 0 &&
+          sessionBackupState == SESSION_BACKUP_NON_EXCLUSIVE);

And your patch would discard both SESSION_BACKUP_EXCLUSIVE and
SESSION_BACKUP_NONE.
-- 
Michael


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

Предыдущее
От: David Rowley
Дата:
Сообщение: Re: [HACKERS] path toward faster partition pruning
Следующее
От: Robert Haas
Дата:
Сообщение: Re: [HACKERS] [POC] Faster processing at Gather node