Assert Levels - Mailing list pgsql-hackers

From Simon Riggs
Subject Assert Levels
Date
Msg-id 1221812743.3913.2500.camel@ebony.2ndQuadrant
Whole thread Raw
Responses Re: Assert Levels
List pgsql-hackers
Currently we have only Assert(), or a run-time test.

Can we introduce levels of assertion? That way we can choose how
paranoid a build to make, like setting log_min_messages.

We know many Assertions are costly, so we don't usually do performance
tests with --enable-cassert. But then we may not notice assertion
failures on those tests for rare failures.

There are also a few run-time tests that "never happen", so perhaps
those could be introduced as a first level of assertion. Production
builds would likely to continue to be built with those tests enabled.

We might also want to have a special log level for such failures, so
people know to report them if they occur, e.g. TELL.

It would also allow us a smoother move into production: gradually reduce
assertion checking over time as software matures.

Anyway, fairly handwavy stuff and I doubt those specific ideas are
useful, but the general train of thought may lead somewhere.

Thoughts?

-- Simon Riggs           www.2ndQuadrant.comPostgreSQL Training, Services and Support



pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: 8.3.1 autovacuum stopped doing anything months ago
Next
From: Dimitri Fontaine
Date:
Subject: Re: Where to Host Project