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")
|
||||
then {
|
||||
PGPASSFILE = "${dataDir}/.pgpass";
|
||||
PGPASSFILE = "${rootDir}/.pgpass";
|
||||
}
|
||||
else { }
|
||||
);
|
||||
|
@ -564,8 +564,8 @@
|
|||
else
|
||||
''
|
||||
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)
|
||||
chmod 0600 ${dataDir}/.pgpass
|
||||
(umask 077; echo "${cfg.replication.primary.hostname}:${builtins.toString cfg.replication.primary.port}:replication:${cfg.replication.username}:''${password}" > ${rootDir}/.pgpass)
|
||||
chmod 0600 ${rootDir}/.pgpass
|
||||
|
||||
if [ ! -s "${dataDir}/PG_VERSION" ]
|
||||
then
|
||||
|
|
Loading…
Reference in a new issue