Send pgdata subdirs with basebackup. Fix for 1e6267a.

This commit is contained in:
anastasia
2021-07-23 22:50:51 +03:00
committed by lubennikovaav
parent 3f4815efa2
commit 14b6796915
3 changed files with 31 additions and 36 deletions

View File

@@ -20,7 +20,6 @@ use crate::local_env::LocalEnv;
use pageserver::{ZTenantId, ZTimelineId};
use crate::storage::PageServerNode;
use postgres_ffi::pg_constants;
//
// ComputeControlPlane
@@ -279,20 +278,6 @@ impl PostgresNode {
},
)?;
// Create pgdata subdirs structure
for dir in pg_constants::PGDATA_SUBDIRS.iter() {
let path = pgdata.as_path().join(*dir);
fs::create_dir_all(path.clone())?;
fs::set_permissions(path, fs::Permissions::from_mode(0o700)).with_context(|| {
format!(
"could not set permissions in data directory {}",
pgdata.display()
)
})?;
}
let mut copyreader = client
.copy_out(sql.as_str())
.with_context(|| "page server 'basebackup' command failed")?;