Use stack for buffer/WAL usage instrumentation #14
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.
TODO
Performance testing
EXPLAIN ANALYZE .. COUNT(*) ..
?)Prototype HLL usage for shared buffers hit distinct (mainly to test whether the API is sound for that usage)
Double check whether the emitted_fpi logic is actually needed (since we do keep the WAL usage counters after all)
Double check we have no more bugs with Nested Loops counter on the loop node itself
Add EXPLAIN option for distinct (this may be easiest after Robert's patch is pushed)
Consider changing "hit distinct" => "distinct", and including reads
Investigate alternatives to modifying utility commands that use internal transactions
Double check whether the fact that parallel query no longer updates the caller's
pgWalUsage
is a problem (did it actually do that before, or just update the instrumentation struct?)Debug test failure in triggers.sql regression test (
merge into parent p using (values (1)) as v(id) on p.aid = v.id
caused an abort, see https://api.cirrus-ci.com/v1/artifact/task/6191633160470528/log/src/test/recovery/tmp_check/log/027_stream_regress_primary.log)==53931==ERROR: AddressSanitizer: heap-use-after-free on address 0x625000ab99c0 at pc 0x556c737b6388 bp 0x7ffedc6f6240 sp 0x7ffedc6f6238