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