Fix and enhance the assertion of no palloc's in a critical section.

Heikki Linnakangas <heikki.linnakangas@iki.fi>

Commit: 1c6821be31f91ab92547a8ed4246762c8cefb1b3
Author: Heikki Linnakangas <heikki.linnakangas@iki.fi>
Date: 2014-06-30T07:26:00Z
Releases: 9.5.0
Fix and enhance the assertion of no palloc's in a critical section.

The assertion failed if WAL_DEBUG or LWLOCK_STATS was enabled; fix that by
using separate memory contexts for the allocations made within those code
blocks.

This patch introduces a mechanism for marking any memory context as allowed
in a critical section. Previously ErrorContext was exempt as a special case.

Instead of a blanket exception of the checkpointer process, only exempt the
memory context used for the pending ops hash table.

Files