mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-14 17:02:56 +00:00
Fix bug in including AUX files in basebacklup
This commit is contained in:
@@ -345,6 +345,7 @@ impl AuxFileV2 {
|
||||
AuxFileV2::Recognized("pg_logical/replorigin_checkpoint", hash)
|
||||
}
|
||||
(2, 1) => AuxFileV2::Recognized("pg_replslot/", hash),
|
||||
(3, 1) => AuxFileV2::Recognized("pg_stat/pgstat.stat", hash),
|
||||
(1, 0xff) => AuxFileV2::OtherWithPrefix("pg_logical/", hash),
|
||||
(0xff, 0xff) => AuxFileV2::Other(hash),
|
||||
_ => return None,
|
||||
|
||||
@@ -634,6 +634,15 @@ async fn import_file(
|
||||
// TODO Backups exported from neon won't have pg_tblspc, but we will need
|
||||
// this to import arbitrary postgres databases.
|
||||
bail!("Importing pg_tblspc is not implemented");
|
||||
} else if file_path.starts_with("pg_logical/")
|
||||
|| file_path.starts_with("pg_replslot/")
|
||||
|| file_path.starts_with("pg_stat/")
|
||||
{
|
||||
let bytes = read_all_bytes(reader).await?;
|
||||
modification
|
||||
.put_file(&file_path.to_str().unwrap(), &bytes, ctx)
|
||||
.await?;
|
||||
debug!("imported aux file \"{}\"", file_path.display());
|
||||
} else {
|
||||
debug!(
|
||||
"ignoring unrecognized file \"{}\" in tar archive",
|
||||
|
||||
Reference in New Issue
Block a user