Re: slru.c race condition (was Re: TRAP: FailedAssertion("!((itemid)->lp_flags

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: slru.c race condition (was Re: TRAP: FailedAssertion("!((itemid)->lp_flags
Дата
Msg-id 20051103160124.GB7138@surnet.cl
обсуждение исходный текст
Ответ на Re: slru.c race condition (was Re: TRAP: FailedAssertion("!((itemid)->lp_flags  ("Jim C. Nasby" <jnasby@pervasive.com>)
Ответы Re: slru.c race condition (was Re: TRAP: FailedAssertion("!((itemid)->lp_flags  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Jim C. Nasby wrote:

> BTW, is MEMORY_CONTEXT_CHECKING that expensive? It seems like it
> shouldn't be, but I'm only guessing at what exactly it does...

Yes, because not only it checks marker bytes at the end of palloc chunks
and similar stuff, but it also overwrites whole contexts with 0x7f when
they are reset.

May I propose to make Assert() yield only WARNINGs, and take out the
most expensive parts of MEMORY_CONTEXT_CHECKING, when --enable-cassert
is disabled?  Enabling it would trigger the current FailedAssertion and
all of MEMORY_CONTEXT_CHECKING.  That way we get all bug reports without
the expensive runtime costs for in-production systems.

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Reducing the overhead of NUMERIC data
Следующее
От: Mark Wong
Дата:
Сообщение: Re: Spinlocks, yet again: analysis and proposed patches