supabase / supautils

PostgreSQL extension that secures a cluster on a cloud environment
https://supabase.github.io/supautils
Apache License 2.0
59 stars 13 forks source link

CREATE EXTENSION error: could not open extension control file supautils.control #84

Closed imans777 closed 8 months ago

imans777 commented 8 months ago

Bug report

Describe the bug

Hey guys I've tried to install supautils on postgresql 14, after installation, I go into psql with superuser and execute: CREATE EXTENSION supautils but I receive this error:

2024-02-23 19:03:17.591 UTC [1149203] ERROR:  could not open extension control file "/usr/share/postgresql/14/extension/supautils.control": No such file or directory
2024-02-23 19:03:17.591 UTC [1149203] STATEMENT:  CREATE EXTENSION IF NOT EXISTS supautils;
ERROR:  could not open extension control file "/usr/share/postgresql/14/extension/supautils.control": No such file or directory

I tried installing supautils both with makefile and from .deb file, with no success.

To Reproduce

git clone https://github.com/supabase/supautils.git
git fetch --tags
git checkout tags/v2.1.0

sudo apt-get update && sudo apt-get install gcc libicu-dev build-essentials postgresql-server-dev-14 make

make && make install

vim /etc/postgresql/postgresql.conf
# add these lines:
shared_preload_libraries = 'supautils'
supautils.reserved_roles = 'postgres'
supautils.reserved_memberships = 'pg_read_server_files, pg_write_server_files, pg_execute_server_program'

psql
$ CREATE EXTENSION supautils;
(error occurs)

Expected behavior

Expected the extension to be created and supautils.control exist in that directory.

System information

steve-chavez commented 8 months ago

supautils is not an extension but a loadable library. You enable it as described on the README https://github.com/supabase/supautils?tab=readme-ov-file#installation