Limitations
What gopgext doesn’t support (yet).
- No goroutines: a backend is single-threaded and Go only runs during calls.
(
sync.Mutexand friends work; blocking on a channel deadlocks, which is reported as a panic.) - Function signatures: no arrays of composite types, composite columns of
composite types,
recordarguments (except as apg.AnyElementinmanualfunctions, read withFields),anycompatible/anyrange-style polymorphic types orVARIADIC. Trigger functions (gopgext/trigger) don’t see transition tables (REFERENCING OLD TABLE ...) and can’t change system columns;Setdoesn’t apply typmods or domain checks (SetTextdoes). - Index operator classes (gopgext/gist, gin, spgist, brin): gin, spgist
and brin take variable-size values, keys and queries (built-in fixed-size
types like
pointaren’t readable as bytes; gist reads them), strategies get no subtype, and operator class parameters are supported for GiST only (integers).typanalyzefunctions (custom statistics, like PostGIS’s) and planner support functions (SUPPORT) aren’t supported either. - gopgext/am: writers to an index are serialized (readers aren’t blocked),
records fit in a page, freed pages aren’t recycled (REINDEX compacts),
builds write one WAL record per row; no parallel builds, bitmap scans,
index-only scans or non-integer options.
examples/vectorhas IVFFlat but not HNSW. - gopgext/fdw: read-only scans (no INSERT/UPDATE/DELETE), no
aggregate/sort/LIMIT pushdown;
IN (...)lists andLIKEaren’t offered as pushable conditions (they’re checked locally). - gopgext/shmem: fixed-size objects created at server start only (no
dynamic shared memory segments or DSA areas); gopgext/hooks: no
emit_log_hook; EXPLAIN output only of finished executions, with auto_explain’s options (no custom EXPLAIN options orMEMORY/SERIALIZE). - Standard library packages that draw randomness from Go’s internal
generator instead of
crypto/rand.Reader(crypto/ecdh,crypto/ecdsa,crypto/rsakey generation,crypto/mlkem, …) don’t build: it starts a timer goroutine. Usecrypto/randandmath/big. - Long-running Go code must call
pg.CheckInterrupts()to be cancelable. - Deep recursion in Go isn’t checked (the backend’s stack is the limit, usually 8 MB).
- Linux x86-64 only;
osfile APIs are not available (TinyGo’s baremetalos): usepg.ReadFile/pg.WriteFile.