Skip to content

fix(net): proper parse for -c inside startup parameters - #1905

Merged
meskill merged 2 commits into
mainfrom
meskill-2026-10-27-fix-net---spz
Oct 27, 2026
Merged

meskill merged 2 commits into
mainfrom
meskill-2026-10-27-fix-net---spz

Conversation

@meskill

@meskill meskill commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Fix the parsing logic for the startup options.

Previously, the parsing was splitting by -c and = without considering escaping and these symbols appearing inside the params, so the -c pgdog.sharding_key=270b77fd-c30e-… becomes ["", " pgdog.sharding_key=270b77fd", "30e-…"] instead of proper value parsing.

Make the logic more like in PG: split by whitespaces, considering escapes.

Also, I removed the special + sign treatment in string from #976 - this is not how PG parses the string and this introduce so many edge cases, while it was never a proper solution for the issue at the first place.

@codecov

codecov Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.21429% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
pgdog/src/net/messages/hello.rs 98.21% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@jkaczman jkaczman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, other than maybe adding a short description of the motivation and what this changes

@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Metal bench passed. All 150 measures within bounds.

suite throughput cpu/txn user cycles/txn user instr/txn kernel cycles/txn ctx/txn
pooler 28.37 (+0.1% ± 1.3%) 27,575 (-0.1% ± 1.3%) 35,147 (+0.0% ± 0.03%) 39,435 (+0.4% ± 2.0%)
lb 29.39 (-0.1% ± 0.9%) 29,249 (+0.4% ± 1.5%) 36,007 (+0.0% ± 0.02%) 40,234 (-0.6% ± 1.3%)
sharding-w2 50.95 (-0.9%) 64,192 (-0.9%) 72,422 (-0.1%) 59,299 (+0.1%) 1.427 (+0.1%)
sharding-w8 160,029 (-0.1%) 45.35 (-0.2%) 64,647 (-0.3%) 56,253 (+0.0%) 52,086 (-0.2%) 0.1537 (+1.6%)
Counters per txn
suite frontend stall l1i refill backend stall
pooler 13,485 (-0.5% ± 2.7%) 3,126 (-0.2% ± 1.2%) 2,606 (-0.1% ± 1.9%)
lb 14,617 (+0.6% ± 3.3%) 3,231 (+0.3% ± 1.3%) 2,846 (-0.2% ± 2.8%)
sharding-w2 35,129 (-1.7%) 5,151 (+0.2%) 7,297 (-1.0%)
sharding-w8 35,314 (-0.3%) 4,874 (-0.1%) 9,768 (-0.6%)

Microbench: all 135 measures within bounds.

  • extended_cold: 11 of 15 benches faster, median -1.2% ± 0.8%
lb flamegraph vs 5beb9bb

lb

Open interactive for hover, zoom and search.

lb removed

Open interactive.

microbench flamegraph vs 5beb9bb

microbench

Open interactive for hover, zoom and search.

microbench removed

Open interactive.

pooler flamegraph vs 5beb9bb

pooler

Open interactive for hover, zoom and search.

pooler removed

Open interactive.

sharding-w2 flamegraph vs 5beb9bb

sharding-w2

Open interactive for hover, zoom and search.

sharding-w2 removed

Open interactive.

sharding-w8 flamegraph vs 5beb9bb

sharding-w8

Open interactive for hover, zoom and search.

sharding-w8 removed

Open interactive.

Logs

lb, microbench, pooler, sharding-w2, sharding-w8, verdict.json

Compared 899dd60 with 5beb9bb.

@meskill
meskill merged commit 330f00e into main Oct 27, 2026
55 checks passed
@meskill
meskill deleted the meskill-2026-10-27-fix-net---spz branch October 27, 2026 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants