fix various minor bugs in initdb, to make it work
authorTomas Vondra <[email protected]>
Mon, 9 Jan 2017 21:45:34 +0000 (22:45 +0100)
committerTomas Vondra <[email protected]>
Mon, 9 Jan 2017 21:49:26 +0000 (22:49 +0100)
commitcfd481f6c3bac4c13ae653a378f8385bd5138c9f
tree0bd2246683378cd25cfc4723d46fe74c66cf8019
parent695d5ba977f5f78faa2e0cafd04401a5978196e5
fix various minor bugs in initdb, to make it work

1) setup_nodeself() was starting it's own postgres process, which
then conflicted with the already running one. Instead just pass
the 'cmdfd' as for the other setup_* methods.

2) make_template0() included VACUUM command with a single '\n'
at the end of the line, resulting in this error:

FATAL:  VACUUM cannot be executed from a function or multi-command string

Apparently, there need to be '\n\n' as in the  non-XL code.
src/bin/initdb/initdb.c