Open
Conversation
Closes RNDSTROPPY-114
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of Changes
Add TPC-C workload support for YDB via its experimental PostgreSQL-compatible wire
protocol (pgwire). This enables benchmarking YDB using the standard
postgresdriver(
pgx) instead of the native gRPC SDK, testing real-world pgwire compatibility.Files changed:
workloads/tpcc/ydb_pgwire.sql— new SQL dialect: PostgreSQL-typed schema withoutCASCADE, REFERENCES, FOR UPDATE, stored procedures, or RETURNING clauses
workloads/tpcc/tx.ts—HAS_RETURNINGENV override (pgwire portals don't supportUPDATE...RETURNING, so this flag splits it into separate UPDATE + SELECT)
YDB pgwire compatibility report
Tested against
ghcr.io/ydb-platform/local-ydb:nightlywithYDB_EXPERIMENTAL_PG=1on 2026-04-10.
Supported
DDL (CREATE/DROP TABLE), single-statement DML, simple-protocol SELECTs, read-only
transactions (stock_level, order_status), data querying after loading via native gRPC.
Degraded — workaround available, full spec achievable
sslmode=disablein connection URLPortal "" not found)default_query_exec_mode=simple_protocolin URLCOPYprotocolplain_bulkinsert method (~10x slower than native)bulkSize=20(customer: 21 cols × 500 = 10500 params overflows)CASCADEin DROP TABLEDROP TABLE IF EXISTSper tableREFERENCES(FK constraints)UPDATE...RETURNINGfails (Portal "" not found)-e HAS_RETURNING=false→ separate UPDATE + SELECTFOR UPDATEsilently ignored (warning 7000)--auth-config-pathwithattempt_threshold: 0Limited — functional with restrictions, not production-grade
Recommended: load via native driver, query via pgwire.
POOL_SIZE=1mandatory to avoid auth lockout storms from parallel connection TLS probes.Blocking — TPC-C cannot run full-spec via pgwire
Multi-statement write transactions break: after
BEGIN+SELECT, the subsequentUPDATE/INSERTreturnsTransaction not found(code 2015). This causes ~90% errorrate on
new_orderandpaymenttransactions. Read-only transactions and single-statementdeliverywork correctly. This appears to be a YDB pgwire transaction-handling bug —until resolved, only read-heavy workloads are viable over pgwire.
How Has This Been Tested?
Result: 1000 iterations, all 5 tx types dispatched, read-only txs (stock_level,
order_status) commit successfully, write txs (new_order, payment) fail with
"Transaction not found". 5.8% overall commit rate, 90% error rate.
Type of Changes
Checklist
feat(tpcc): ydb-pg wire support attempt
Closes RNDSTROPPY-114