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

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Craig Ringer <craig(at)2ndquadrant(dot)com>
Cc: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Assertion failure when the non-exclusive pg_stop_backup aborted.
Date: 2017-09-22 02:00:34
Message-ID: CAB7nPqTeNwgVptV8vCAwvVJztwq3DjE2MiUYJYR8FtSHoq6cTA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Sep 22, 2017 at 10:41 AM, Craig Ringer <craig(at)2ndquadrant(dot)com> wrote:
> Another one to watch out for is that elog(...) and ereport(...) invoke
> CHECK_FOR_INTERRUPTS. That's given me exciting surprises before when
> combined with assertion checking and various exit cleanup hooks.

Ahah. Good point. In this case LWLockWaitForVar() is one thing to
worry about if LWLock tracing is enabled because it can log things
before holding the existing interrupts. This can be avoided easily in
the case of this issue by updating sessionBackupState before calling
WALInsertLockRelease and while holding the WAL insert lock. Surely
this meritates a comment in the patch we want here.
--
Michael

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Kyotaro HORIGUCHI 2017-09-22 02:19:52 Re: hash index on unlogged tables doesn't behave as expected
Previous Message Craig Ringer 2017-09-22 01:41:19 Re: Assertion failure when the non-exclusive pg_stop_backup aborted.