mirror of
https://github.com/hanzoai/sql.git
synced 2026-11-15 19:38:30 +00:00
/begin opens a transaction on its connection; /query and /exec run inside it until /commit or /rollback. A statement worker hands such a connection to a transaction worker (zap.tx_workers, default 8) over a datagram socket the postmaster opens, so a transaction never holds up another client's statements. A request outside one commits before its reply. Errors carry the SQLSTATE, and a serialization failure or deadlock answers 409. _entities stores data as jsonb with timestamptz times, converting a text table in place, which is what hanzoai/orm reads with ->> and indexes. Values are emitted by column type and strings escaped; an id that starts with a digit is no longer a number. Statement workers bind only once recovery has finished, so a standby does not listen. max_worker_processes is 32: the listener now runs zap.workers + zap.tx_workers background workers. Co-authored-by: Hanzo Dev <[email protected]>