pgsql: Fix and enhance the assertion of no palloc's in a critical secti

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема pgsql: Fix and enhance the assertion of no palloc's in a critical secti
Дата
Msg-id E1X1WHJ-0000ev-Bs@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
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.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/1c6821be31f91ab92547a8ed4246762c8cefb1b3

Modified Files
--------------
src/backend/access/transam/xlog.c     |   29 +++++++++++++++--
src/backend/postmaster/checkpointer.c |   30 +++++++++---------
src/backend/storage/lmgr/lwlock.c     |   56 ++++++++++++++++++++++++++-------
src/backend/storage/lmgr/proc.c       |    3 +-
src/backend/storage/smgr/md.c         |   25 ++++++++++++---
src/backend/utils/mmgr/mcxt.c         |   40 ++++++++++++++++++-----
src/include/nodes/memnodes.h          |    3 ++
src/include/storage/lwlock.h          |    1 +
src/include/utils/memutils.h          |    2 ++
9 files changed, 147 insertions(+), 42 deletions(-)


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: pgsql: Remove use_json_as_text options from json_to_record/json_populat
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: pgsql: Revert the assertion of no palloc's in critical section.