Simply intends to set expectations around the fact that a config file
is not used *and* doesn't affect anything material about the standby
clone command.
This uses a notion of "logging level" (like NOTICE) that is not yet
seen this program, but I'll probably introduce that soon.
Signed-off-by: Daniel Farina <daniel@heroku.com>
This patch changes raising the error "You need to use connection
parameters to the master when issuing a STANDBY CLONE command." to
only occur when no host (a global variable, that is abused for at
least two purposes, but is okay in this case) is passed, rather than
when no config file is passed, which is fine for standby clone (which
itself is a wrapper for rsync)
Signed-off-by: Daniel Farina <daniel@heroku.com>
Grab the configuration struct changes. It was expeditious to un-do
some of my by-hand line-wrapping that avoids 80 character limit,
though.
Conflicts:
config.c
config.h
repmgr.c
repmgr.h
repmgrd.c
This would cause a consistent panic (exit() call) without reason.
This should not enable any overruns (but check my work).
Signed-off-by: Dan Farina <drfarina@acm.org>
Previously, this print would use memory freed by PQClear previously.
Also allocate/free memory to prevent this tiny memory leak.
Signed-off-by: Dan Farina <drfarina@acm.org>
This is done in a separate patch to try and reduce the sound and fury
of the patch that actually did the conversion from sprintf to
snprintf-alikes.
Signed-off-by: Dan Farina <drfarina@acm.org>
Signed-off-by: Peter van Hardenberg <pvh@heroku.com>
Move out string operations to another file, and introduce a frontend
to snprintf for various situations. This change is important for
catching and eliminating sprintf overflows, which are as of now many
times silently corrupting memory.
Signed-off-by: Dan Farina <drfarina@acm.org>
Signed-off-by: Peter van Hardenberg <pvh@heroku.com>
pgsql conventions (tabs, four-spaces-wide, etc) applied all around.
Also tried to fix some very tiny capitalization errors, auto-fill
problems, and some inter-block vertical whitespacing issues.
Long strings in repmgr.c were left intact, though. They are rather
numerous and are less of a problem than tiny bits of function calls
and comments wrapping over a line; the latter kind of problem has been
mostly fixed.
Signed-off-by: Dan Farina <drfarina@acm.org>
Signed-off-by: Peter van Hardenberg <pvh@heroku.com>