Add function to safely modify postgresql.auto.conf

This is required for PostgreSQL 12 and later.
This commit is contained in:
Ian Barwick
2019-08-14 16:57:42 +09:00
parent 4ebc43fd63
commit f5044465cb
7 changed files with 190 additions and 27 deletions

View File

@@ -57,6 +57,7 @@
#include <sys/stat.h>
#include <signal.h>
#include "repmgr.h"
#include "compat.h"
#include "controldata.h"
@@ -72,7 +73,6 @@
#include <storage/fd.h> /* for PG_TEMP_FILE_PREFIX */
/* globally available variables *
* ============================ */
@@ -348,7 +348,7 @@ main(int argc, char **argv)
*-------------
*/
/* -D/--pgdata */
/* -D/--pgdata/--data-dir */
case 'D':
strncpy(runtime_options.data_dir, optarg, MAXPGPATH);
break;
@@ -804,7 +804,6 @@ main(int argc, char **argv)
exit_with_cli_errors(&cli_errors, NULL);
}
/*----------
* Determine the node type and action; following are valid:
*