TegDB Server is a PostgreSQL-compatible database server built on top of TegDB, designed for progressive scalability from single-node to distributed deployments.
- Rust (stable)
cargo buildCreate config.toml (example):
[server]
bind_addr = "127.0.0.1:5432"
[storage]
base_path = "/tmp/tegdb-server-data"Notes:
storage.base_pathmust be an absolute path.
cargo runpsql -h 127.0.0.1 -p 5432 -U postgres- Startup + AuthenticationOk (trust/no-password)
- Simple Query (
Querymessage) - Responses: RowDescription/DataRow/CommandComplete/ErrorResponse/ReadyForQuery
- No SSL (
SSLRequestis answered withN) - No extended query protocol (Parse/Bind/Execute)
- No prepared statements
- Transactions are not supported yet (
BEGIN/COMMIT/ROLLBACKreturn an error)
This repo includes a TegDB-compatible sysbench Lua script for point selects:
sysbench/oltp_point_selects_tegdb.lua
It avoids prepared statements and explicit transactions and uses a TegDB-compatible schema:
TEXT(n)(fixed length) instead ofCHAR(n)/VARCHAR(n)- no
DEFAULTclauses - no secondary indexes
sysbench sysbench/oltp_point_selects_tegdb.lua \
--db-driver=pgsql \
--pgsql-host=127.0.0.1 \
--pgsql-port=5432 \
--pgsql-user=postgres \
--pgsql-password='' \
--pgsql-db=sbtest \
--tables=4 \
--table-size=10000 \
--create_secondary=off \
--auto_inc=off \
preparesysbench sysbench/oltp_point_selects_tegdb.lua \
--db-driver=pgsql \
--pgsql-host=127.0.0.1 \
--pgsql-port=5432 \
--pgsql-user=postgres \
--pgsql-password='' \
--pgsql-db=sbtest \
--tables=4 \
--table-size=10000 \
--threads=32 \
--time=120 \
--events=0 \
--report-interval=10 \
--skip-trx=on \
--db-ps-mode=disable \
--create_secondary=off \
--auto_inc=off \
runsysbench sysbench/oltp_point_selects_tegdb.lua \
--db-driver=pgsql \
--pgsql-host=127.0.0.1 \
--pgsql-port=5432 \
--pgsql-user=postgres \
--pgsql-password='' \
--pgsql-db=sbtest \
--tables=4 \
cleanupSee AGENTS.md for architecture, conventions, and quality requirements.