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 ---------------------------(end of broadcast)--------------------------- TIP 6: explain analyze is your friend