mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-10 06:52:55 +00:00
clean up some leftovers after 746f66731
This commit is contained in:
@@ -38,7 +38,7 @@ impl ComputeControlPlane {
|
||||
let pageserver = Arc::new(PageServerNode::from_env(&env));
|
||||
|
||||
let pgdatadirspath = &env.pg_data_dirs_path();
|
||||
let nodes: Result<BTreeMap<_, _>> = fs::read_dir(pgdatadirspath)
|
||||
let nodes: Result<BTreeMap<_, _>> = fs::read_dir(&pgdatadirspath)
|
||||
.with_context(|| format!("failed to list {}", pgdatadirspath.display()))?
|
||||
.into_iter()
|
||||
.map(|f| {
|
||||
|
||||
@@ -202,13 +202,7 @@ impl PostgresNodeExt for PostgresNode {
|
||||
file.read_to_string(&mut buffer).unwrap();
|
||||
println!("--------------- regression.diffs:\n{}", buffer);
|
||||
}
|
||||
// self.dump_log_file();
|
||||
|
||||
if let Ok(mut file) = File::open(self.env.pg_data_dir("main").join("log")) {
|
||||
let mut buffer = String::new();
|
||||
file.read_to_string(&mut buffer).unwrap();
|
||||
println!("--------------- pgdatadirs/main/log:\n{}", buffer);
|
||||
}
|
||||
self.dump_log_file();
|
||||
}
|
||||
regress_check
|
||||
}
|
||||
@@ -287,7 +281,7 @@ impl PostgresNodeExt for PostgresNode {
|
||||
println!("Running {}", sql);
|
||||
let result = client.query(sql, &[]);
|
||||
if result.is_err() {
|
||||
// self.dump_log_file();
|
||||
self.dump_log_file();
|
||||
}
|
||||
result.unwrap()
|
||||
}
|
||||
|
||||
@@ -31,14 +31,6 @@ pub struct BranchInfo {
|
||||
pub latest_valid_lsn: Option<Lsn>,
|
||||
}
|
||||
|
||||
// impl BranchInfo {
|
||||
// pub fn lsn_string(&self) -> String {
|
||||
// let lsn_string_opt = self.latest_valid_lsn.map(|lsn| lsn.to_string());
|
||||
// let lsn_str = lsn_string_opt.as_deref().unwrap_or("?");
|
||||
// format!("{}@{}", self.name, lsn_str)
|
||||
// }
|
||||
// }
|
||||
|
||||
#[derive(Debug, Clone, Copy)]
|
||||
pub struct PointInTime {
|
||||
pub timelineid: ZTimelineId,
|
||||
@@ -116,14 +108,6 @@ pub fn init_repo(conf: &PageServerConf, repo_dir: &Path) -> Result<()> {
|
||||
fs::write(conf.branch_path("main"), data)?;
|
||||
println!("created main branch");
|
||||
|
||||
// XXX: do we need that now? -- yep, for test only
|
||||
|
||||
// // Also update the system id in the LocalEnv
|
||||
// local_env.systemid = systemid;
|
||||
// // write config
|
||||
// let toml = toml::to_string(&local_env)?;
|
||||
// fs::write(repopath.join("config"), toml)?;
|
||||
|
||||
println!(
|
||||
"new zenith repository was created in {}",
|
||||
repo_dir.display()
|
||||
|
||||
@@ -10,19 +10,6 @@ edition = "2018"
|
||||
clap = "2.33.0"
|
||||
anyhow = "1.0"
|
||||
serde_json = "1"
|
||||
# rand = "0.8.3"
|
||||
# tar = "0.4.33"
|
||||
# serde = { version = "1.0", features = ["derive"] }
|
||||
# toml = "0.5"
|
||||
# lazy_static = "1.4"
|
||||
# regex = "1"
|
||||
# # hex = "0.4.3"
|
||||
# bytes = "1.0.1"
|
||||
# # fs_extra = "1.2.0"
|
||||
# nix = "0.20"
|
||||
# # thiserror = "1"
|
||||
# url = "2.2.2"
|
||||
|
||||
postgres = { git = "https://github.com/zenithdb/rust-postgres.git", rev="9eb0dbfbeb6a6c1b79099b9f7ae4a8c021877858" }
|
||||
|
||||
# FIXME: 'pageserver' is needed for ZTimelineId. Refactor
|
||||
|
||||
Reference in New Issue
Block a user