πŸ”Œ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 https://ossc-db.github.io/pg_store_plans/ for more details.

Installation

Download Source Files

Compilation

Ensure PostgreSQL development package is installed

On RHEL/CentOS-based systems:

Set the PATH variable to your PostgreSQL installation directory

The pg_config command should be OK

Modify 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