Check data directory not used by an active instance before cloning

This involves adding some infrastructure to parse pg_control in a
reasonably version-independent fashion. This will probably be useful
in other contexts where we need to verify the status of a
data directory where the instance isn't running.
This commit is contained in:
Ian Barwick
2017-05-12 08:46:49 +09:00
parent d6b36e13d8
commit 4c5f065ef2
5 changed files with 165 additions and 3 deletions

View File

@@ -27,7 +27,7 @@ include Makefile.global
$(info Building against PostgreSQL $(MAJORVERSION))
REPMGR_CLIENT_OBJS = repmgr-client.o repmgr-action-master.o repmgr-action-standby.o repmgr-action-cluster.o \
config.o log.o strutil.o dbutils.o dirutil.o compat.o
config.o log.o strutil.o dbutils.o dirutil.o compat.o controldata.o
REPMGRD_OBJS = repmgrd.o
$(REPMGR_CLIENT_OBJS): repmgr-client.h
@@ -58,6 +58,7 @@ additional-clean:
rm -f repmgrd.o
rm -f compat.o
rm -f config.o
rm -f controldata.o
rm -f dbutils.o
rm -f dirutil.o
rm -f log.o