Re: Re: [sqlsmith] FailedAssertion("!(XLogCtl->Insert.exclusiveBackup)", File: "xlog.c", Line: 10200)

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>, Andreas Seltenreich <seltenreich(at)gmx(dot)de>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Magnus Hagander <magnus(at)hagander(dot)net>
Subject: Re: Re: [sqlsmith] FailedAssertion("!(XLogCtl->Insert.exclusiveBackup)", File: "xlog.c", Line: 10200)
Date: 2017-01-17 13:26:28
Message-ID: CAB7nPqQc_cNxL9LUdC4uSdYJ7QeGmTGK60+CsbJYU3amCtTu3Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I sent this email one month ago but forgot to cc pgsql-hackers ;)
For the record, it is the set of patches attached that have been
pushed as 974ece5, and only Fujii-san has received them... Thanks for
committing the fix by the way!

On Thu, Dec 15, 2016 at 3:30 AM, Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
> On Wed, Dec 14, 2016 at 11:10 PM, Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
>> On second thought, do users really want to distinguish those three errornous
>> states? I'm inclined to merge the checks for those three conditions into one,
>> that is,
>>
>> if (XLogCtl->Insert.exclusiveBackupState != EXCLUSIVE_BACKUP_IN_NONE)
>> {
>> WALInsertLockRelease();
>> ereport(ERROR,
>> (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
>> errmsg("a backup is already in progress"),
>>
>> Also it may be better to handle the similar checks in pg_stop_backup,
>> in the same way.
>
> Here is the updated version of the patch that I applied the above "merge" to.

Okay.

> Unfortunately this patch is not applied cleanly to old versions.
> So we need to create more patches for back-patch.

Attached are patches for all supported branches. I have tweaked the
following comment for master/9.6, that's why I am re-sending it:
+ * (see comments of ExclusiveBackupState for more details).

Getting master and 9.6 was straight-forward. 9.5 showed a small
conflict. 9.4 bigger conflicts but the code blocks are
straight-forward to place except that the tablespace map does not
exist there, and that we need to be careful that the same flow is used
for the removal of the backup_label file. At 9.3, conflicts are caused
because of changes of APIs for WAL insert locking. Finally 9.2 showed
no conflicts with 9.3, which was a bit surprising.
--
Michael

Attachment Content-Type Size
backup-standby-v8-93-92.patch text/x-diff 10.5 KB
backup-standby-v8-94.patch text/x-diff 10.5 KB
backup-standby-v8-master-96.patch text/x-diff 10.9 KB
backup-standby-v8-95.patch text/x-diff 10.8 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2017-01-17 13:37:30 Re: [COMMITTERS] pgsql: Fix an assertion failure related to an exclusive backup.
Previous Message Amit Kapila 2017-01-17 13:14:59 Re: Gather Merge