mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-05 04:22:56 +00:00
Hotfix for safekeeper timelines with unknown pg_version.
Assume DEFAULT_PG_VERSION = 14
This commit is contained in:
@@ -125,7 +125,17 @@ impl PhysicalStorage {
|
||||
wal_seg_size,
|
||||
state.commit_lsn,
|
||||
)?,
|
||||
_ => bail!("unsupported postgres version"),
|
||||
pg_majorversion => {
|
||||
// This is a quik hack to work with old timelines that don't have
|
||||
// pg_version in the control file. We can remove it after this is fixed properly.
|
||||
const DEFAULT_PG_MAJOR_VERSION: u32 = 14;
|
||||
warn!("unknown postgres version {pg_majorversion} assume {DEFAULT_PG_MAJOR_VERSION}");
|
||||
postgres_ffi::v14::xlog_utils::find_end_of_wal(
|
||||
&timeline_dir,
|
||||
wal_seg_size,
|
||||
state.commit_lsn,
|
||||
)?
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user