Transactions and catalog
Transactions
The endpoint supports autocommit and explicit transaction blocks with
READ COMMITTED visibility. A write inside a block writes its files but
publishes no metadata until COMMIT; other connections see nothing before the
commit. COMMIT publishes every staged write of every table in one metadata
transaction. ROLLBACK deletes the staged files.
BEGIN/COMMIT/ROLLBACKare accepted. Reads inside a block see the published snapshot plus that block's staged writes.CREATE TABLE,DROP TABLEandALTER TABLEare staged in a block and published byCOMMITin the same metadata transaction as the block's data writes. A peer sees nothing before the commit, andROLLBACKleaves no table or file behind. ACREATE TABLEis immediately usable by later statements of the same block.SAVEPOINT,RELEASE SAVEPOINTandROLLBACK TO SAVEPOINTare supported. A savepoint captures the block's staged data and table DDL;ROLLBACK TO SAVEPOINTdiscards the changes after it and recovers a failed transaction.CREATE INDEX,REINDEX,TRUNCATE, IVM maintenance, subscriptions, users and grants inside a block are still refused with0A000. A non-CDCDELETErewrite is also refused.COPY ... FROM STDINis a write: it is staged in the block and published byCOMMIT.REPEATABLE READ,SERIALIZABLEand theirSETforms are refused with0A000.- A failed transaction returns
25P02for subsequent statements untilROLLBACKor a successfulROLLBACK TO SAVEPOINT.COMMITinside a failed block ends the transaction as a rollback, matching PostgreSQL. - A write or table DDL in a multi-statement simple-query batch is still refused: those statements are not run in one transaction yet. Split them into separate messages or use an explicit block.
statement_timeoutcancels a running query with57014; the connection remains usable.idle_in_transaction_session_timeoutis not implemented.
Catalog
A PostgreSQL database maps to exactly one LakeSoul namespace. Inside a connection:
- User tables live in the
publicschema. current_database()reports the namespace name.pg_catalogandinformation_schemaexpose the tables, columns and types visible in that namespace.psql \d,\dtand\dnwork.- Other namespaces appear in
pg_database, but their tables are not readable from this connection. Cross-database reads and writes are refused.
Connecting to a database that is not a LakeSoul namespace fails at startup with
FATAL XX000. The quick start uses the default namespace created by
script/meta_init.sql.
search_path does not bypass the database boundary; schemas other than public
are not a second namespace.
Session settings
The endpoint accepts and applies:
| Setting | Effect |
|---|---|
SET TIME ZONE / SET timezone | Session time zone for timestamp rendering and parsing |
SET statement_timeout | Per-statement budget |
SET search_path | Accepted; does not cross the database boundary |
SET ivfflat.probes | ANN probe count for vector scans |
RESET ALL / DISCARD ALL | Restore the connection defaults |
Unsupported settings return 42704. SET LOCAL and SET GLOBAL for the time
zone return 0A000.