Installing the live query plan extension

Install the whpg_live_query_plan extension on your WarehousePG (WHPG) cluster to use the live query plan in WEM. The extension is optional.

Run these steps as gpadmin on the coordinator:

  1. Download the package from the EDB repository:

    <your-token> is the token you received when you registered for the EDB subscription, and <major_version> is your WHPG version, 6 or 7.

  2. Create a file all_hosts on the coordinator, listing all hosts in the cluster. For example:

    cdw
    scdw
    sdw1
    sdw2
    sdw3
  3. Use the gpsync utility to transfer the package to all hosts in the cluster, then use the gpssh utility to install it:

  4. Load the extension as a shared library. Check for existing shared libraries. The coordinator and the segments can have different values, so read both:

    gpconfig -s shared_preload_libraries
  5. Enable whpg_live_query_plan and turn on query metrics. gpconfig -c sets one value on every host, so keep the libraries that are already listed on any host.

    If other libraries are listed, for example pg_cron, add the extension after them:

    gpconfig -c shared_preload_libraries -v 'pg_cron,whpg_live_query_plan'
    gpconfig -c gp_enable_query_metrics -v on

    If no libraries are listed, set the extension alone:

    gpconfig -c shared_preload_libraries -v whpg_live_query_plan
    gpconfig -c gp_enable_query_metrics -v on
  6. Restart WHPG:

    gpstop -raf
  7. Create the extension in the database that WHPG_DATABASE in /etc/edb/wem/wem.conf names. This is the database WEM connects to. Management > Settings also shows it in WHPG Connection.

    CREATE EXTENSION whpg_live_query_plan;

To watch a running query, see Viewing query plans.


Could this page be better? Report a problem or suggest an addition!