From e6eb5484910dc9f635a43bab4721d112930837e4 Mon Sep 17 00:00:00 2001 From: Arseny Sher Date: Thu, 16 Nov 2023 19:49:45 +0100 Subject: [PATCH] create extension pg_wait_sampling in compute_ctl --- compute_tools/src/spec.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/compute_tools/src/spec.rs b/compute_tools/src/spec.rs index a85d6287b1..bdaa34aaa7 100644 --- a/compute_tools/src/spec.rs +++ b/compute_tools/src/spec.rs @@ -670,6 +670,12 @@ pub fn handle_extensions(spec: &ComputeSpec, client: &mut Client) -> Result<()> info!("creating system extensions with query: {}", query); client.simple_query(query)?; } + if libs.contains("pg_wait_sampling") { + // Create extension only if this compute really needs it + let query = "CREATE EXTENSION IF NOT EXISTS pg_wait_sampling"; + info!("creating system extensions with query: {}", query); + client.simple_query(query)?; + } } Ok(())