Sunday, September 21, 2008

Re: [HACKERS] Assert Levels

Peter Eisentraut <peter_e@gmx.net> writes:
> Simon Riggs wrote:
>> Well, we don't. That's why I'd suggest to do it slowly and classify
>> everything as medium weight until proven otherwise.

> Once you have classified all asserts, what do we do with the result?
> What would be the practical impact? What would be your recommendation
> about who runs with what setting?

Being able to keep asserts on while doing performance stress testing
was the suggested use case. I think we'd still recommend having them
off in production.

FWIW, my gut feeling about it is that 99% of the asserts in the backend
are lightweight, ie, have no meaningful effect on performance. There
are a small number that are expensive (the tests on validity of List
structures come to mind, as well as what we already discussed). I don't
have any more evidence for this than Simon has for his "they're mostly
medium-weight" assumption, but I'd point out that by definition most of
the backend code isn't performance-critical. So I think that an option
to turn off a few particularly expensive asserts would be sufficient.
Moreover, the more asserts you turn off, the less useful it would be to
do testing of this type. I see essentially no value in a mode that
turns off the majority of assertions.

regards, tom lane

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

No comments: