compute_tools: enable passing through stripe size

This commit is contained in:
John Spray
2023-12-18 19:52:16 +00:00
parent 727eef05b3
commit aa1252d687
2 changed files with 14 additions and 0 deletions

View File

@@ -69,6 +69,17 @@ pub fn write_postgres_conf(
)?;
}
if let Some(stripe_size) = &spec.shard_stripe_size {
writeln!(
file,
"neon.stripe_size={}",
// TODO: postgres should take stripe size in page count, to match how the
// rest of the system stores it.
// https://github.com/neondatabase/neon/pull/5837#discussion_r1430485706
(stripe_size * 8 * 1024) / (1024 * 1024)
)?;
}
match spec.mode {
ComputeMode::Primary => {}
ComputeMode::Static(lsn) => {

View File

@@ -73,6 +73,9 @@ pub struct ComputeSpec {
// information about available remote extensions
pub remote_extensions: Option<RemoteExtSpec>,
// Stripe size for pageserver sharding, in pages
pub shard_stripe_size: Option<usize>,
}
/// Feature flag to signal `compute_ctl` to enable certain experimental functionality.