postgres: do callback hell instead of giant slices - #2002
Draft
hdonnay wants to merge 7 commits into
Draft
Conversation
hdonnay
force-pushed
the
hack/pgx-callback-hell
branch
2 times, most recently
from
August 28, 2026 15:24
b993b9e to
6dca8a9
Compare
Exercise UpdateVulnerabilities with enough alias-carrying vulnerabilities to cross batch-flush boundaries and verify the link tables directly. The benchmark reports peak live heap alongside the usual metrics, since allocation lifetime is invisible to B/op. Signed-off-by: Brad Lugo <blugo@redhat.com>
Insert and link aliases every 500 vulnerabilities instead of accumulating bookkeeping for the whole run, halving peak heap for large updates (82MB to 40MB at 50k vulnerabilities). The out-of-band alias inserts now happen mid-run, so a failed update can leave alias rows committed; they are unreachable until a later successful run links them. Signed-off-by: Brad Lugo <blugo@redhat.com>
The chunked link statements are INSERT..SELECTs that must see alias rows committed by concurrent updaters after the transaction began, so pin read committed instead of inheriting default_transaction_isolation. Signed-off-by: Brad Lugo <blugo@redhat.com>
Chunking runs the link statements often enough to cross the prepared-statement threshold, where the generic plan built for unnest's default row estimate gets chosen and is disastrous for the actual array sizes. Executing unprepared keeps per-execution planning. Signed-off-by: Brad Lugo <blugo@redhat.com>
hdonnay
force-pushed
the
hack/pgx-callback-hell
branch
from
August 28, 2026 19:53
6dca8a9 to
a4780dd
Compare
Signed-off-by: Hank Donnay <hdonnay@redhat.com> Change-Id: I85a31f5796751b32e698b7b0108461146a6a6964
Signed-off-by: Hank Donnay <hdonnay@redhat.com> Change-Id: I7b0aef57f26107254a546add7442b9556a6a6964
Signed-off-by: Hank Donnay <hdonnay@redhat.com> Change-Id: If851629a80d299ba5730d2b7601bbe246a6a6964
hdonnay
force-pushed
the
hack/pgx-callback-hell
branch
from
August 28, 2026 20:31
a4780dd to
e74cee1
Compare
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.
No description provided.