Postgresql upgrade checklist

Checklist for major postgresql database upgrade: shutdown standby servers on each standby perform pg_upgrade shutdown master perform pg_upgrade if pg_upgrade fails on postgres database with encoding mismatch, re-init database with initdb start master verify master is ok check if recovery.conf present in slave datadir start slaves one-by-one check if slaves are live and recovering if […]

Printing backtrace on SIGSEGV

New version of log-malloc2 provides new helpful functions and scripts that make backtrace printing and analyzing easy and convenient. log-malloc2_util.h provides few fully inlined functions: 1. log_malloc_backtrace_init(void) Pre-initializes backtrace() function, to avoid any later memory allocations. Use of this function is optional, but it’s good to use it on program start if you want to […]

Simple XSLT ifnull for numbers

Answer to question how to display zero instead of NaN in XSLT for non existing node containing number values (kind of ifnull or coallesce functions that are available in SQL). You can do it by standard expressive XSLT way, with using variable and <xsl:choose>, or abuse built-in sum() function and do whole thing in one […]