fix replication
This commit is contained in:
parent
816abd49dc
commit
105e95b886
1 changed files with 3 additions and 3 deletions
|
@ -531,7 +531,7 @@
|
||||||
) // (
|
) // (
|
||||||
if (cfg.replication.enable && cfg.replication.role == "replica")
|
if (cfg.replication.enable && cfg.replication.role == "replica")
|
||||||
then {
|
then {
|
||||||
PGPASSFILE = "${dataDir}/.pgpass";
|
PGPASSFILE = "${rootDir}/.pgpass";
|
||||||
}
|
}
|
||||||
else { }
|
else { }
|
||||||
);
|
);
|
||||||
|
@ -564,8 +564,8 @@
|
||||||
else
|
else
|
||||||
''
|
''
|
||||||
read -r password < ${cfg.replication.passwordFile}
|
read -r password < ${cfg.replication.passwordFile}
|
||||||
(umask 077; echo "${cfg.replication.primary.hostname}:${builtins.toString cfg.replication.primary.port}:replication:${cfg.replication.username}:''${password}" > ${dataDir}/.pgpass)
|
(umask 077; echo "${cfg.replication.primary.hostname}:${builtins.toString cfg.replication.primary.port}:replication:${cfg.replication.username}:''${password}" > ${rootDir}/.pgpass)
|
||||||
chmod 0600 ${dataDir}/.pgpass
|
chmod 0600 ${rootDir}/.pgpass
|
||||||
|
|
||||||
if [ ! -s "${dataDir}/PG_VERSION" ]
|
if [ ! -s "${dataDir}/PG_VERSION" ]
|
||||||
then
|
then
|
||||||
|
|
Loading…
Reference in a new issue