supautils
Overview
| Package | Version | Category | License | Language |
|---|---|---|---|---|
supautils | 3.2.1 | SEC | Apache-2.0 | C |
| ID | Extension | Bin | Lib | Load | Create | Trust | Reloc | Schema |
|---|---|---|---|---|---|---|---|---|
| 7010 | supautils | No | Yes | Yes | No | No | No | - |
| Related | passwordcheck_cracklib pgsodium supabase_vault pg_session_jwt anon pg_tde pgsmcrypto pgaudit |
|---|
Version
| Type | Repo | Version | PG Ver | Package | Deps |
|---|---|---|---|---|---|
| EXT | PIGSTY | 3.2.1 | 1817161514 | supautils | - |
| RPM | PIGSTY | 3.2.1 | 1817161514 | supautils_$v | - |
| DEB | PIGSTY | 3.2.1 | 1817161514 | postgresql-$v-supautils | - |
Build
You can build the RPM / DEB packages for supautils using pig build:
pig build pkg supautils # build RPM / DEB packages
Install
You can install supautils directly. First, make sure the PGDG and PIGSTY repositories are added and enabled:
pig repo add pgsql -u # Add repo and update cache
Install the extension using pig or apt/yum/dnf:
pig install supautils; # Install for current active PG version
pig ext install -y supautils -v 18 # PG 18
pig ext install -y supautils -v 17 # PG 17
pig ext install -y supautils -v 16 # PG 16
pig ext install -y supautils -v 15 # PG 15
pig ext install -y supautils -v 14 # PG 14
dnf install -y supautils_18 # PG 18
dnf install -y supautils_17 # PG 17
dnf install -y supautils_16 # PG 16
dnf install -y supautils_15 # PG 15
dnf install -y supautils_14 # PG 14
apt install -y postgresql-18-supautils # PG 18
apt install -y postgresql-17-supautils # PG 17
apt install -y postgresql-16-supautils # PG 16
apt install -y postgresql-15-supautils # PG 15
apt install -y postgresql-14-supautils # PG 14
Preload:
shared_preload_libraries = 'supautils';
Usage
Sources: README, homepage, releases
supautils is a loadable library that unlocks selected superuser-only PostgreSQL features for non-superusers through configuration. Upstream emphasizes that it adds no tables, functions, or security labels to the database.
Load it
Cluster-wide:
shared_preload_libraries = 'supautils'
supautils.privileged_role = 'your_privileged_role'
Per role:
ALTER ROLE role1 SET session_preload_libraries TO 'supautils';
Privileged role capabilities
The README documents a privileged proxy role that can create publications, foreign data wrappers, event triggers, and privileged extensions without granting SUPERUSER.
SET ROLE privileged_role;
CREATE PUBLICATION p FOR ALL TABLES;
DROP PUBLICATION p;
For event triggers, the README says privileged-role triggers run for non-superusers, skip superusers, and also skip reserved roles. It also documents one limitation: those triggers do not fire while creating publications, foreign data wrappers, or extensions.
Important configuration knobs
supautils.superusersupautils.privileged_rolesupautils.privileged_role_allowed_configssupautils.privileged_extensionssupautils.extension_custom_scripts_pathsupautils.constrained_extensionssupautils.extensions_parameter_overridessupautils.policy_grantssupautils.drop_trigger_grantssupautils.reserved_rolessupautils.reserved_membershipssupautils.hint_rolessupautils.log_skipped_evtrigs
Useful examples
Allow a non-superuser to create specific privileged extensions:
supautils.privileged_extensions = 'hstore'
Allow a role to manage RLS policies on tables it does not own:
supautils.policy_grants = '{ "my_role": ["public.not_my_table"] }'
Force an extension into a specific schema on CREATE EXTENSION:
supautils.extensions_parameter_overrides = '{ "pg_cron": { "schema": "pg_catalog" } }'
Protect managed-service roles from CREATEROLE users:
supautils.reserved_roles = 'connector, storage_admin'
supautils.reserved_memberships = 'pg_read_server_files'
Release notes
v3.2.1was released on 2026-04-02 and its published notes are maintenance-oriented; no new user-facing SQL surface is described there.v3.2.0added a hint when aGRANTprivilege is missing.
Caveat
This extension is configuration-driven. When documenting it, prefer the GUCs and behavior guarantees in the README over implying database objects that upstream explicitly says it does not create.
Feedback
Was this page helpful?
Thanks for the feedback! Please let us know how we can improve.
Sorry to hear that. Please let us know how we can improve.