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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>
Cc: Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Greg Stark <gsstark(at)mit(dot)edu>, Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, Gavin Sherry <swm(at)linuxworld(dot)com(dot)au>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: slru.c race condition (was Re: TRAP: FailedAssertion("!((itemid)->lp_flags
Date: 2005-11-03 23:02:27
Message-ID: 4489.1131058947@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

"Jim C. Nasby" <jnasby(at)pervasive(dot)com> writes:
> Seriously, I am wondering about the performance hit of always checking
> debug_assertions.
> http://archives.postgresql.org/pgsql-hackers/2005-08/msg00389.php
> indicates that even with debug_assertions=false, --enable-cassert has a
> big performance impact.

That's because MEMORY_CONTEXT_CHECKING happens anyway --- it's not
currently switched off by the GUC variable. I don't think we have any
recent data point about the cost of Asserts per se, except your own
report that it seems minimal. My thought is that it would be even
more minimal if the tests of debug_assertion were removed ;-) ...
except in association with Asserts that are actually testing an
expensive-to-check condition, of which there are very few.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2005-11-04 02:17:43 Re: Reducing the overhead of NUMERIC data
Previous Message Jim C. Nasby 2005-11-03 21:34:24 Re: slru.c race condition (was Re: TRAP: FailedAssertion("!((itemid)->lp_flags

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2005-11-04 02:17:43 Re: Reducing the overhead of NUMERIC data
Previous Message Jim C. Nasby 2005-11-03 21:34:24 Re: slru.c race condition (was Re: TRAP: FailedAssertion("!((itemid)->lp_flags