日本語 | English
This repository provides unofficial Windows x64 binaries of pg_qualstats.
pg_qualstats collects statistics about predicates used in WHERE clauses and JOIN conditions. The resulting data can help identify frequently evaluated predicates, correlated columns, and potential indexing opportunities.
- repository:
powa-team/pg_qualstats - ref:
2.1.4 - version: 2.1.4
- license: PostgreSQL-style; see
LICENSE
pgextwin validates PostgreSQL 14–18 on Windows x64.
The current pgextwin package-set release is v2.1.4-windows.2.
Assets use explicit PostgreSQL-major names:
pg_qualstats-2.1.4-pg14-windows-x64.zip
...
pg_qualstats-2.1.4-pg18-windows-x64.zip
- Choose the ZIP matching the PostgreSQL major version.
- Stop PostgreSQL before replacing extension binaries.
- Copy
lib/pg_qualstats.dllto PostgreSQL'slibdirectory. - Copy
share/extension/*to PostgreSQL'sshare/extensiondirectory. - Add
pg_qualstatstoshared_preload_libraries. - Restart PostgreSQL.
- In each database where statistics are required, run:
CREATE EXTENSION pg_qualstats;Example preload setting:
shared_preload_libraries = 'pg_qualstats'If other extensions are already preloaded, use a comma-separated list rather than replacing them.
A simple predicate query:
SELECT *
FROM public.example
WHERE status = 1;can then contribute statistics to pg_qualstats. Typical inspection queries include:
SELECT * FROM pg_qualstats;
SELECT * FROM pg_qualstats_pretty;For deterministic testing or short diagnostic sessions, pg_qualstats.sample_rate = 1 samples every eligible query. Review the upstream documentation before changing this in production because sampling and memory settings affect overhead.
pg_qualstats 2.1.4 is compiled directly with MSVC x64 against the selected PostgreSQL installation.
The pgextwin build applies one source-layout compatibility edit in the disposable CI checkout. Upstream places a preprocessor conditional inside the argument list of a compatibility ShmemInitHash(...) macro call. GCC accepts that layout, while MSVC rejects the #if/#else tokens while collecting macro arguments. pgextwin moves the conditional outside the invocation while preserving the same hash flags.
No permanent forked source tree is maintained.
The Windows DLL export list is generated from:
Pg_magic_func,_PG_init,- every upstream
PG_FUNCTION_INFO_V1(...)function, - each corresponding
pg_finfo_<function>symbol.
CI then validates the actual DLL export table with dumpbin.
A successful compile is not sufficient. Every supported PostgreSQL major must pass:
- exact upstream LICENSE verification,
- MSVC x64 build of
pg_qualstats.dll, - explicit DLL-export validation,
- installation into the matching PostgreSQL Windows distribution,
- PostgreSQL startup with
shared_preload_libraries=pg_qualstats, CREATE EXTENSION pg_qualstats,- creation of a real probe table,
- execution of predicates on multiple columns,
- verification that pg_qualstats collected predicate rows for the probe table,
- verification that
pg_qualstats_prettyexposes the collected statistics, - package creation and artifact upload.
Pull requests and pushes to main validate only. A branch named release/<tag> publishes a GitHub Release only after the complete matrix succeeds.
Important upstream settings include:
pg_qualstats.enabledpg_qualstats.track_constantspg_qualstats.maxpg_qualstats.resolve_oidspg_qualstats.track_pg_catalogpg_qualstats.sample_rate
The correct values depend on workload, memory budget, and the amount of diagnostic detail required. Use the upstream documentation as the authoritative reference.
Collected statistics are not durable across PostgreSQL server restarts.
The repository LICENSE is an exact copy of the pinned upstream pg_qualstats license. Release ZIPs copy LICENSE directly from the upstream checkout used for that package.
These binaries are unofficial pgextwin builds and are not official binary releases from pg_qualstats, PoWA, or PostgreSQL.