Skip to content

Commit

Permalink
chore: check shared_preload_libraries in pg_init (paradedb#1690)
Browse files Browse the repository at this point in the history
  • Loading branch information
rebasedming authored Sep 20, 2024
1 parent c47c3af commit 728acdd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pg_search/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ pub fn MyDatabaseId() -> u32 {
#[allow(non_snake_case)]
#[pg_guard]
pub unsafe extern "C" fn _PG_init() {
if !pg_sys::process_shared_preload_libraries_in_progress {
error!("pg_search must be loaded via shared_preload_libraries. Add 'pg_search' to shared_preload_libraries in postgresql.conf and restart Postgres.");
}

postgres::options::init();
GUCS.init("pg_search");

Expand Down

0 comments on commit 728acdd

Please sign in to comment.