Add an --assume-prod option
authorCΓ©dric Villemain <cedric@2ndquadrant.fr>
Mon, 7 Nov 2011 13:00:02 +0000 (14:00 +0100)
committerCΓ©dric Villemain <cedric@2ndquadrant.fr>
Thu, 10 Nov 2011 02:53:16 +0000 (03:53 +0100)
commit0ff408711dab18b05de26656a945fa37e363f6aa
tree11eda764c1d521f383f39c079591fd4484692de2
parent1118e0ab0028fee46a5bdaac9de169068e4fd03f
Add an --assume-prod option

This is based on --assume-standby-mode. Reduce the option name per suggestion
from Greg (but I kept the original one for standby mode).

The option is only used in check_postgres_checkpoint and allows to confirm or
emit a critical if the server is not in the expected mode.

Note: this can be used in other places, and maybe improved (to reduce the
number og open_controldata calls)

TODO/FIXME:
* I found that --assume-p or --assume-s are viewed by GetOpt like the longer
version of the option, a bug ?
* The original code to call pg_controldata does not work in French (because of
regex/locale). Why not use LANG=C in those checks where there is NO point to
use locale and error prone regex ?
check_postgres.pl