mirror of
https://github.com/neondatabase/neon.git
synced 2026-07-03 20:20:38 +00:00
compute_tools: enable passing through stripe size
This commit is contained in:
@@ -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) => {
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user