PostgreSQL Extension Status and Limits
In Development
The PostgreSQL extension is usable, but it is still an active development surface. Plan for incremental feature growth rather than assuming complete PostgreSQL FDW parity.
Supported Today
- Remote-mode PostgreSQL bridge to a running KalamDB server
- Shared and user table reads and writes through FDW callbacks
- Explicit
BEGIN,COMMIT, andROLLBACKtransaction blocks for Kalam-backed tables CREATE TABLE ... USING kalamdbas the public PostgreSQL-side authoring syntax- Auto-injected system columns:
_seqon all tables and_useridon user tables - Forwarding KalamDB table options from PostgreSQL
WITH (...) - Direct pass-through execution with
kalam_exec(...) - Session-scoped tenant routing with
kalam.user_id - Extension helper functions including
kalam_version()andSNOWFLAKE_ID()
Current Gaps and Constraints
kalam_compiled_mode()currently reportsremote; this chapter documents that mode.IMPORT FOREIGN SCHEMAis not yet supported in remote mode.- Do not declare
_seq,_userid, or_deletedinCREATE TABLE ... USING kalamdb. The extension injects the visible system columns itself. _seqis read-only metadata projected from KalamDB. Values supplied inINSERTorUPDATEare not forwarded._useridoverride support is limited toINSERTon user tables, and multi-rowINSERTstatements must use one_useridvalue consistently.- PostgreSQL may still reapply filters locally in cases where full pushdown is not available.
- User-scoped operations should set
kalam.user_idbefore reads and writes. UPDATEandDELETEon user tables still use the sessionkalam.user_idscope. Reassigning ownership through_useridupdates is not supported.- Savepoints and PostgreSQL subtransactions are not yet supported.
- DDL statements are not supported inside explicit transaction blocks.
- Only the current mirrored
CREATE TABLE ... USING kalamdbDDL flow is documented here. DDL support remains intentionally limited and does not provide general PostgreSQL FDW parity. - Stream-table writes are rejected inside explicit transaction blocks.
Prototype Syntax vs Supported Syntax
This docs section focuses on the current remote-mode flow.
If you see older prototype scripts that mention experimental helpers such as schema opt-in functions, treat those as development artifacts unless they are covered in this chapter. The supported documentation surface today is:
CREATE EXTENSIONCREATE SERVER/ALTER SERVER/DROP SERVERCREATE TABLE ... USING kalamdbBEGIN/COMMIT/ROLLBACKkalam_exec(...)SELECT,INSERT,UPDATE,DELETE- extension helper functions and
kalam.user_id
Troubleshooting
| Symptom | Likely cause | What to check |
|---|---|---|
extension "pg_kalam" is not available | Extension files are not installed into the active PostgreSQL instance | Reinstall the extension into that PostgreSQL 16 installation |
could not access file "$libdir/pg_kalam" | PostgreSQL cannot find the shared library | Verify the extension was installed into the correct PostgreSQL library directory |
| Remote connection failure | The kalam_server host or port is wrong, or KalamDB is down | Verify the foreign server options and the KalamDB gRPC endpoint |
| Auth failures | auth_header is missing or stale | Update the foreign server definition with the right bearer token or shared secret |
| User-table writes fail | kalam.user_id was not set | Set kalam.user_id in the PostgreSQL session before the statement |
IMPORT FOREIGN SCHEMA fails | Feature gap in current remote mode | Use CREATE TABLE ... USING kalamdb or kalam_exec(...) instead |
Related
Last updated on