pscan
pscan · A PostgreSQL 9.6 test extension comparing tuple-based parallel heap scans with manually partitioned block-range scans.
Overview
Usage
Sources:
pscan is a PostgreSQL parallel heap-scan test tool. p_tuplescan(regclass) exercises the parallel tuple-scan path used by PostgreSQL 9.6 parallel sequential scan, while p_brangescan(regclass) divides the relation into consecutive block ranges assigned to workers. Overloads accept an explicit worker count, and GUC pscan.n_workers supplies the default.
These functions are not correctness-preserving replacements for SQL scans. The upstream README states that they skip visibility checks and filtering, fetch all tuples, and assume a garbage-free all-visible table. The block-range method can issue less-sequential I/O because workers read distant ranges concurrently.
Use version 1.0 only on disposable benchmark relations and verify the exact PostgreSQL build, because it depends on internal heap and parallel-worker APIs. Do not expose the functions to application roles, compare returned values with ordinary queries, or use timings without controlling cache state, table visibility, storage type, worker startup, and concurrent load.