On Fri, Sep 22, 2017 at 10:41 AM, Craig Ringer <cr...@2ndquadrant.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 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers