Tags: tvondra/postgres
Tags
explain: show prefetch stats for indexes Shows various prefetch-related stats in EXPLAIN. This includes average prefetch distance, number of prefetches, stalls, skipped blocks etc. The stats are tracked by the read_stream, and get exposed to explain by calling index_get_prefetch_stats. This copies the counters from the read_stream into instrumentation. Notes: - One annoying thing is that calling index_get_prefetch_stats from ExecEndIndexScan does not work, because EXPLAIN gets called before that. It's enough for workers, though. So it's called from the explain code, which does the trick for the leader. - Maybe we could have a stats struct in the index scan state, and only pass it to the read_stream? Then the stream would update it directly. - We're still passing individual counters around. Maybe we should have a struct, and pass that around.
allow pgbench to pin backends/threads Supported policies are "none" (default), "colocated" (both processes on the same random core) and "random" (both processes on different cores).
allow pgbench to pin backends/threads Supported policies are "none" (default), "colocated" (both processes on the same random core) and "random" (both processes on different cores).
Fix regression caused by experimental patch with recently-added test … …case
Rename lastBlock to currentPrefetchBlock. The new name seems more descriptive: lastBlock/currentPrefetchBlock is useful precisely when the _current_ block number doesn't change across a group of neighboring positions/TIDs/index tuples. The new name also makes it clear that lastBlock/currentPrefetchBlock are only used when prefetching (bearing in mind that not all amgetbatch calls involving a read stream/prefetching). Note to self: the fact that lastBlock/currentPrefetchBlock works in a way that knows precisely how heapam_index_fetch_tuple will consume blocks and release pins reminds me that Andres had a good point when he said that the read stream ought to live in heapam, and not in indexam.c.
PreviousNext