From e6b7589ba494f93b7337b1eef1ce5a58be7c33d1 Mon Sep 17 00:00:00 2001 From: Konstantin Knizhnik Date: Thu, 24 Apr 2025 17:46:10 +0300 Subject: [PATCH] Undo commit d1728a6bcd872ab9d79a95a5f3f5fa72243ed898 because it causes problems with creating pg_search extension (#11700) ## Problem See https://neondb.slack.com/archives/C03H1K0PGKH/p1745489241982209 pg_search extension now can not be created. ## Summary of changes Undo d1728a6bcd872ab9d79a95a5f3f5fa72243ed898 Co-authored-by: Konstantin Knizhnik --- compute_tools/src/bin/compute_ctl.rs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/compute_tools/src/bin/compute_ctl.rs b/compute_tools/src/bin/compute_ctl.rs index aacef91d56..e337ee7b15 100644 --- a/compute_tools/src/bin/compute_ctl.rs +++ b/compute_tools/src/bin/compute_ctl.rs @@ -57,13 +57,24 @@ use tracing::{error, info}; use url::Url; use utils::failpoint_support; +// Compatibility hack: if the control plane specified any remote-ext-config +// use the default value for extension storage proxy gateway. +// Remove this once the control plane is updated to pass the gateway URL +fn parse_remote_ext_config(arg: &str) -> Result { + if arg.starts_with("http") { + Ok(arg.trim_end_matches('/').to_string()) + } else { + Ok("http://pg-ext-s3-gateway".to_string()) + } +} + #[derive(Parser)] #[command(rename_all = "kebab-case")] struct Cli { #[arg(short = 'b', long, default_value = "postgres", env = "POSTGRES_PATH")] pub pgbin: String, - #[arg(short = 'r', long)] + #[arg(short = 'r', long, value_parser = parse_remote_ext_config)] pub remote_ext_config: Option, /// The port to bind the external listening HTTP server to. Clients running