diff --git a/extension/Cargo.toml b/extension/Cargo.toml index 2351402..eb3832d 100644 --- a/extension/Cargo.toml +++ b/extension/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "vectorize" -version = "0.18.1" +version = "0.18.2" edition = "2021" publish = false diff --git a/extension/Trunk.toml b/extension/Trunk.toml index 92e37eb..2675d16 100644 --- a/extension/Trunk.toml +++ b/extension/Trunk.toml @@ -6,7 +6,7 @@ description = "The simplest way to orchestrate vector search on Postgres." homepage = "https://github.com/tembo-io/pg_vectorize" documentation = "https://github.com/tembo-io/pg_vectorize" categories = ["orchestration", "machine_learning"] -version = "0.18.1" +version = "0.18.2" loadable_libraries = [{ library_name = "vectorize", requires_restart = true }] [build] diff --git a/extension/sql/meta.sql b/extension/sql/meta.sql index 7883664..ae82268 100644 --- a/extension/sql/meta.sql +++ b/extension/sql/meta.sql @@ -14,6 +14,14 @@ CREATE TABLE vectorize.prompts ( user_prompt TEXT NOT NULL ); +-- allow pg_monitor to read from vectorize schema +GRANT USAGE ON SCHEMA vectorize TO pg_monitor; +GRANT SELECT ON ALL TABLES IN SCHEMA vectorize TO pg_monitor; +GRANT SELECT ON ALL SEQUENCES IN SCHEMA vectorize TO pg_monitor; +ALTER DEFAULT PRIVILEGES IN SCHEMA vectorize GRANT SELECT ON TABLES TO pg_monitor; +ALTER DEFAULT PRIVILEGES IN SCHEMA vectorize GRANT SELECT ON SEQUENCES TO pg_monitor; + + INSERT INTO vectorize.prompts (prompt_type, sys_prompt, user_prompt) VALUES ( 'question_answer', diff --git a/extension/sql/vectorize--0.18.1--0.18.2.sql b/extension/sql/vectorize--0.18.1--0.18.2.sql new file mode 100644 index 0000000..3d332b7 --- /dev/null +++ b/extension/sql/vectorize--0.18.1--0.18.2.sql @@ -0,0 +1,5 @@ +GRANT USAGE ON SCHEMA vectorize TO pg_monitor; +GRANT SELECT ON ALL TABLES IN SCHEMA vectorize TO pg_monitor; +GRANT SELECT ON ALL SEQUENCES IN SCHEMA vectorize TO pg_monitor; +ALTER DEFAULT PRIVILEGES IN SCHEMA vectorize GRANT SELECT ON TABLES TO pg_monitor; +ALTER DEFAULT PRIVILEGES IN SCHEMA vectorize GRANT SELECT ON SEQUENCES TO pg_monitor; diff --git a/extension/src/guc.rs b/extension/src/guc.rs index fea0470..af1ec04 100644 --- a/extension/src/guc.rs +++ b/extension/src/guc.rs @@ -220,7 +220,7 @@ pub fn get_guc(guc: VectorizeGuc) -> Option { error!("failed to convert CStr to str"); } } else { - info!("no value set for GUC: {:?}", guc); + debug1!("no value set for GUC: {:?}", guc); None } } diff --git a/extension/src/init.rs b/extension/src/init.rs index 6fb55e8..039900d 100644 --- a/extension/src/init.rs +++ b/extension/src/init.rs @@ -14,10 +14,10 @@ pub fn init_pgmq() -> Result<()> { ))? .context("error checking if queue exists")?; if queue_exists { - info!("queue already exists"); + debug1!("queue already exists"); return Ok(()); } else { - info!("creating queue;"); + debug1!("creating queue;"); let ran: Result<_, spi::Error> = Spi::connect(|mut c| { let _r = c.update( &format!("SELECT pgmq.create('{VECTORIZE_QUEUE}');"), diff --git a/extension/src/search.rs b/extension/src/search.rs index db7e7b4..e5bee96 100644 --- a/extension/src/search.rs +++ b/extension/src/search.rs @@ -39,7 +39,6 @@ pub fn init_table( init::init_pgmq()?; let guc_configs = get_guc_configs(&transformer.source); - info!("guc_configs: {:?}", guc_configs); // validate API key where necessary and collect any optional arguments // certain embedding services require an API key, e.g. openAI // key can be set in a GUC, so if its required but not provided in args, and not in GUC, error