Locate postgres binary and libs for 'postgres --wal-redo'

based on POSTGRES_DISTRIB_DIR.
This commit is contained in:
Stas Kelvich
2021-06-09 18:04:30 +03:00
parent bb1446e33a
commit bf56ea8c43
3 changed files with 18 additions and 23 deletions

View File

@@ -154,7 +154,7 @@ impl ComputeControlPlane {
concat!(
"shared_preload_libraries = zenith\n",
"synchronous_standby_names = 'pageserver'\n", // TODO: add a new function arg?
"zenith.callmemaybe_connstring = '{}'\n", // FIXME escaping
"zenith.callmemaybe_connstring = '{}'\n", // FIXME escaping
),
node.connstr()
)

View File

@@ -52,9 +52,6 @@ impl PageServerNode {
self.env.pg_distrib_dir.to_str().unwrap(),
)
.env("ZENITH_REPO_DIR", self.repo_path())
.env("PATH", self.env.pg_bin_dir().to_str().unwrap()) // needs postres-wal-redo binary
.env("LD_LIBRARY_PATH", self.env.pg_lib_dir().to_str().unwrap())
.env("DYLD_LIBRARY_PATH", self.env.pg_lib_dir().to_str().unwrap())
.status()
.expect("pageserver init failed");
@@ -94,10 +91,7 @@ impl PageServerNode {
"POSTGRES_DISTRIB_DIR",
self.env.pg_distrib_dir.to_str().unwrap(),
)
.env("ZENITH_REPO_DIR", self.repo_path())
.env("PATH", self.env.pg_bin_dir().to_str().unwrap()) // needs postres-wal-redo binary
.env("LD_LIBRARY_PATH", self.env.pg_lib_dir().to_str().unwrap())
.env("DYLD_LIBRARY_PATH", self.env.pg_lib_dir().to_str().unwrap());
.env("ZENITH_REPO_DIR", self.repo_path());
if !cmd.status()?.success() {
bail!(