Hotfix to disable grant create on public schema

`GRANT CREATE ON SCHEMA public` fails if there is no schema `public`.
Disable it in release for now and make a better fix later (it is
needed for v15 support).
This commit is contained in:
Stas Kelvich
2022-10-22 02:26:28 +03:00
committed by Anastasia Lubennikova
parent 9f49605041
commit 2f399f08b2

View File

@@ -423,11 +423,11 @@ pub fn handle_grants(node: &ComputeNode, client: &mut Client) -> Result<()> {
);
db_client.simple_query(&alter_query)?;
// Explicitly grant CREATE ON SCHEMA PUBLIC to the web_access user.
// This is needed since postgres 15, where this privilege is removed by default.
let grant_query: String = "GRANT CREATE ON SCHEMA public TO web_access".to_string();
info!("grant query for db {} : {}", &db.name, &grant_query);
db_client.simple_query(&grant_query)?;
// // Explicitly grant CREATE ON SCHEMA PUBLIC to the web_access user.
// // This is needed since postgres 15, where this privilege is removed by default.
// let grant_query: String = "GRANT CREATE ON SCHEMA public TO web_access".to_string();
// info!("grant query for db {} : {}", &db.name, &grant_query);
// db_client.simple_query(&grant_query)?;
}
Ok(())