Skip to Content
PostgreSQL ExtensionStatus & Limits

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, and ROLLBACK transaction blocks for Kalam-backed tables
  • CREATE TABLE ... USING kalamdb as the public PostgreSQL-side authoring syntax
  • Auto-injected system columns: _seq on all tables and _userid on 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() and SNOWFLAKE_ID()

Current Gaps and Constraints

  • kalam_compiled_mode() currently reports remote; this chapter documents that mode.
  • IMPORT FOREIGN SCHEMA is not yet supported in remote mode.
  • Do not declare _seq, _userid, or _deleted in CREATE TABLE ... USING kalamdb. The extension injects the visible system columns itself.
  • _seq is read-only metadata projected from KalamDB. Values supplied in INSERT or UPDATE are not forwarded.
  • _userid override support is limited to INSERT on user tables, and multi-row INSERT statements must use one _userid value consistently.
  • PostgreSQL may still reapply filters locally in cases where full pushdown is not available.
  • User-scoped operations should set kalam.user_id before reads and writes.
  • UPDATE and DELETE on user tables still use the session kalam.user_id scope. Reassigning ownership through _userid updates 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 kalamdb DDL 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 EXTENSION
  • CREATE SERVER / ALTER SERVER / DROP SERVER
  • CREATE TABLE ... USING kalamdb
  • BEGIN / COMMIT / ROLLBACK
  • kalam_exec(...)
  • SELECT, INSERT, UPDATE, DELETE
  • extension helper functions and kalam.user_id

Troubleshooting

SymptomLikely causeWhat to check
extension "pg_kalam" is not availableExtension files are not installed into the active PostgreSQL instanceReinstall the extension into that PostgreSQL 16 installation
could not access file "$libdir/pg_kalam"PostgreSQL cannot find the shared libraryVerify the extension was installed into the correct PostgreSQL library directory
Remote connection failureThe kalam_server host or port is wrong, or KalamDB is downVerify the foreign server options and the KalamDB gRPC endpoint
Auth failuresauth_header is missing or staleUpdate the foreign server definition with the right bearer token or shared secret
User-table writes failkalam.user_id was not setSet kalam.user_id in the PostgreSQL session before the statement
IMPORT FOREIGN SCHEMA failsFeature gap in current remote modeUse CREATE TABLE ... USING kalamdb or kalam_exec(...) instead
Last updated on