pg_execplan
pg_execplan · Saves and executes serialized query plans on patched PostgreSQL servers.
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 102444 | pg_execplan | pg_execplan | 0.1 | OLAP | PostgreSQL | C |
PostgreSQL · 12
Usage
Sources:
- Extension control file
- Installation SQL
- SQL file generation
- Two-node integration test
- Project and PostgreSQL patch
pg_execplan is a research extension for exchanging serialized query plans between compatible, patched PostgreSQL 12 development instances. The pg_repeater prototype uses its SQL interface on the receiving server. The upstream project has several revisions labeled 0.1 with different function names. The sources above identify the revision that exposes pg_exec_plan.
Enable the receiving database
Use a superuser in a database running the matching patched server and library. The upstream integration test preloads postgres_fdw and pg_execplan on both nodes. The control file declares no SQL extension dependencies and fixes the extension in the schema chosen at installation.
At this revision, pg_store_query_plan writes a planned statement to a server-side file, pg_exec_stored_plan reads a saved plan, and pg_exec_plan accepts query text and its serialized plan. Use trusted input and restrict access to these functions. Plans contain internal server structures. Use matching source revisions and catalog definitions on both nodes.