The hosted provider's Postgres extensions
The hosted provider's Postgres extensions
A hosted project's archive creates extensions a stock PostgreSQL lacks:
pg_net (the triggers that call edge functions through net.http_post),
pg_cron (its scheduled jobs in cron.job), supabase_vault (its secrets
in vault.secrets), pgsodium, hypopg and index_advisor. Where the
fleet server lacks one, pg_restore refuses its CREATE EXTENSION and
everything that hangs on it, and a move counts those tables short.
stado database extension install <name> --extension pg_net [--extension pg_cron]... [--pending]
stado database extension list <name>
install builds each extension from the source
stado-rs/data/declarations/postgres-extensions.json pins (the publisher's
tag, verified against its sha256, kept under
~/.local/share/stado-postgres-extensions/<extension>/<tag>) with the
server's own pg_config and the declaration's make_variables (PG_CFLAGS=-Wno-ignored-attributes:
an extension built with -Werror, such as pg_cron, otherwise fails on an attribute in PostgreSQL's
own headers the host's compiler only warns about; and PG_LDFLAGS=-lintl when pg_config --libs names
-lintl, since a server built with its translations makes its headers call libintl, which macOS
resolves only for a library that links it; and an extension's own make_variables, appended, such as
pg_net's PG_CFLAGS=-Wno-error=vla, since the server's flags make a variable-length array an error
and pg_net's macOS event loop declares one; and, for each library the extension links, its headers and
directory as pkg-config --cflags and --libs-only-L name them), installs it into that server's directories, writes
the settings it reads with ALTER SYSTEM (pg_cron runs its jobs in
background workers in the database itself, so no job opens a password
connection), and restarts <name>-database when a library must load at start
(shared_preload_libraries, kept beside what it loads already), waiting the
seconds the declaration states for the server to answer. It creates no
extension: a restore does, as its archive says. --pending installs into the
fleet server a refused move kept on <name>-database-fleet-pending. list
says per declared extension the pinned source, whether the server offers it,
the version created in the database and whether its library is loaded.
stado database migrate installs every extension the backup's manifest names
that the declaration pins before it restores, and reports them under
extensions_installed. While it restores and counts it holds each extension's
declared pause_during_restore (pg_cron: cron.launch_active_jobs = off,
so the jobs it was just given do not run and write cron.job_run_details
while it is counted) and resets it after, whatever came of the count; a
setting it cannot reset is named. A table an extension declares
transient_tables for (pg_net's net._http_response, whose worker deletes
responses older than pg_net.ttl as soon as it runs) that holds fewer rows on
the target is listed under not_carried with that reason, not as a mismatch.
An extension the declaration does not pin stays under the restore's
extensions_unavailable.
pgsodium is installed but not preloaded: it preloads only with a getkey script
answering the server's root key, and the hosted provider's key does not leave
with the archive. Its declared setting pgsodium.enable_event_trigger = off
keeps the event trigger a hosted archive carries, which reads that setting on
every DDL statement, from failing them; no column mask is regenerated.
A library the extension links that pkg-config does not find (pg_net
libcurl, supabase_vault and pgsodium libsodium) is refused naming it,
before anything is built; a build that fails names make's own words and every
variable it was given; an extension the declaration does not pin is
refused naming the ones it does; a user that may not run ALTER SYSTEM is
refused naming that it needs a superuser. A server that does not come up after
the restart is given its earlier postgresql.auto.conf back and restarted, and
the refusal says whether it answers with it. A server that does not answer when
install starts, because it cannot load a library its
shared_preload_libraries names (an extension a PostgreSQL upgrade took out of
the keg, or a list written as one quoted name), is given that setting back in
list form holding only the libraries its pg_config --pkglibdir holds,
restarted, and the install goes on; the report names what was dropped under
recovered. One that does not answer for another reason is refused with the
last fatal line of its log.
In Stado Desktop a database row's Extensions… lists the same (stado database extension list) and installs the extensions given one per line,
with its toggle for the server a refused move kept (--pending).
Source: this website