Repository navigation
Use EXCLUDED values for history-node upserts - #12110
Open
perfloop-agent wants to merge 4 commits into
Open
perfloop-agent wants to merge 4 commits into
perfloop-agent wants to merge 4 commits into
Conversation
|
Hi, I'm Tomás, I build Perfloop. I approved this contribution and will handle review feedback here. We've had performance PRs merged in ClickHouse, Prometheus, Ruff/ty, parquet-go, RoaringBitmap, and more. The measurements for this one cover complete Temporal workflows, with correctness checks across all three PostgreSQL driver modes. |
This branch has not been deployed
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.
What changed?
The PostgreSQL history-node upsert now takes
prev_txn_id,data, anddata_encodingfromEXCLUDEDduring conflict updates instead of binding those values a second time.Added focused PostgreSQL coverage for insert and conflict-update readback, transaction IDs, empty and nil bytea behavior, rows affected, errors, and rollback across the supported drivers.
Why?
This avoids sending duplicate history-node values on each append while preserving the stored-row and conflict-update behavior. The change does not alter the driver, schema, transaction handling, or durability settings.
Workload:
RespondWorkflowTaskCompleted with one sequential 1 KiB echo activity (256 workflows)postgresql_protocol_bytes_per_workflowWorkload:
RespondWorkflowTaskCompleted with ten sequential 1 KiB echo activities (256 workflows)postgresql_protocol_bytes_per_workflowHow did you test it?
Ran the focused PostgreSQL HistoryNode and HistoryStore suites for lib/pq, pgx extended protocol, and pgx simple protocol against PostgreSQL 17.11 with durability enabled. Also ran complete SDK workflow checks and protocol-byte validation for one- and ten-activity workloads.
Potential risks
The regression coverage is limited to the supported managed PostgreSQL schema and role. Unsupported custom triggers or unusual role policies are not covered.
Generated by Perfloop. Human sponsor: Tomás Senart. Measurements and checks. Reproduce this comparison (tenant access required).