• Andres Freund's avatar
    Don't allow to disable backend assertions via the debug_assertions GUC. · 3bdcf6a5
    Andres Freund authored
    The existance of the assert_enabled variable (backing the
    debug_assertions GUC) reduced the amount of knowledge some static code
    checkers (like coverity and various compilers) could infer from the
    existance of the assertion. That could have been solved by optionally
    removing the assertion_enabled variable from the Assert() et al macros
    at compile time when some special macro is defined, but the resulting
    complication doesn't seem to be worth the gain from having
    debug_assertions. Recompiling is fast enough.
    
    The debug_assertions GUC is still available, but readonly, as it's
    useful when diagnosing problems. The commandline/client startup option
    -A, which previously also allowed to enable/disable assertions, has
    been removed as it doesn't serve a purpose anymore.
    
    While at it, reduce code duplication in bufmgr.c and localbuf.c
    assertions checking for spurious buffer pins. That code had to be
    reindented anyway to cope with the assert_enabled removal.
    3bdcf6a5
catcache.c 49.8 KB