🔌pg_store_plans
The PostgreSQL extension pg_store_plans is a contrib module that provides a way to store execution plans generated by the query planner.
The open-source project is accessible on GitHub: https://github.com/ossc-db/pg_store_plans
PG_STORE_PLANS store execution plans like PG_STAT_STATEMENTS does for queries.
About
This extension is OPTIONAL. Datasentinel will automatically consider it if it is installed
Once the settings are configured, there is no further action required. Resetting pg_store_plans is unnecessary.
Datasentinel collects execution plan activity metrics for all queries at regular intervals to enable detailed analyzes on the GUI.
Upon installation, you gain access to:
Historical statistics for each query ID's plan.
Execution plans.
See http://pgstoreplans.osdn.jp/pg_store_plans.html for more details.
Use this extension with caution in your high-load production clusters as it could lead to an increased burden.
To mitigate this, consider setting the min_duration parameter to a value greater than 0.
Installation
To be installed in the internal database named postgres
Download Source Files
PostgreSQL version
pg_store_plans version
Download file url
< 10
1.3.1
>= 10 and < 14
1.4
14
1.6.1
15
1.7
Compilation
Ensure you have set the PATH variable to your PostgreSQL installation directory
The pg_config command should be OK
Modify postgresql.conf
postgresql.conf
Add pg_store_plans
to shared_preload_libraries
parameter
Add the following lines
Restart PostgreSQL
Create The Extension
connect to the internal database named postgres with superuser privileges
Check The Extension
Check Parameters
Check Execution Plans
Connected as datasentinel user and in postgres database
Last updated