From 0ec5ddea0b855908ca3bda60cc0778d906e4bb9e Mon Sep 17 00:00:00 2001 From: Anastasia Lubennikova Date: Mon, 17 Oct 2022 19:21:36 +0300 Subject: [PATCH] GRANT CREATE ON SCHEMA public TO web_access --- compute_tools/src/spec.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/compute_tools/src/spec.rs b/compute_tools/src/spec.rs index bd47614386..89a6a93510 100644 --- a/compute_tools/src/spec.rs +++ b/compute_tools/src/spec.rs @@ -380,6 +380,10 @@ pub fn handle_grants(node: &ComputeNode, client: &mut Client) -> Result<()> { info!("grant query {}", &query); client.execute(query.as_str(), &[])?; + + // Explicitly grant CREATE ON SCHEMA PUBLIC to the web_access user. + // This is needed since postgres 15, where this privilege is removed by default. + client.execute("GRANT CREATE ON SCHEMA public TO web_access", &[])?; } // Do some per-database access adjustments. We'd better do this at db creation time,