bdr: Prevent null pointer dereference for blank output plugin params
authorCraig Ringer <[email protected]>
Wed, 14 May 2014 05:57:24 +0000 (13:57 +0800)
committerAlvaro Herrera <[email protected]>
Wed, 14 May 2014 18:46:12 +0000 (14:46 -0400)
commit11a49f4b6f9dea1295f16ffdd5e555e6728ba3a0
tree55be950ea4bbe4122d179e43226f262e771ae837
parent81c247422ba0431a9dcf8cc14d995a95bd843f71
bdr: Prevent null pointer dereference for blank output plugin params

bdr_output would crash with a segfault due to a null pointer dereference
if a parameter was specified but no corresponding value was supplied, e.g.

pg_recvlogical -P bdr_output -S test -d postgres --create
pg_recvlogical -P bdr_output -S test -d postgres --start -f - -o pg_version

This now fails with an ERROR instead of crashing and forcing postmaster
re-init, e.g.

    ERROR:  uint32 parameter "pg_version" had no value
contrib/bdr/bdr_output.c