Database Management
DPA PostgreSQL Plan Poll Job Fails With “String or binary data would be truncated in table … CONPPT_xx, column PLAN_NODE”
On one or more PostgreSQL monitored instances, DPA intermittently stops plan polling and logs show a "PlanPollJob failed" error.
First published date
Last published date
Overview
- The PlanPollJob for the affected monitor fails repeatedly.
- DPA logs contain messages such as:
“Monitor for database [name] failed in job [PlanPollJob] due to [String or binary data would be truncated … PLAN_NODE] … Will attempt to retry every [xx] seconds…” - The monitor may intermittently stop collecting plan data or appear unstable.
Product section
Cause
-
DPA’s plan polling job (PlanPollJob) collects execution plans and stores each plan node as JSON in the
PLAN_NODEcolumn of the CONPPT_xx table (per monitored instance). -
In some environments (especially Citus / distributed PostgreSQL and complex plans), the JSON plan nodes are larger than the defined size of the PLAN_NODE column, resulting in a data truncation / 2628 error when inserting into
CONPPT_xx(for exampleCONPPT_9). -
When this happens, the insert fails, which causes PlanPollJob to throw
JobExecutionException, and plan polling for that instance fails and may stop or flap in and out of monitoring.
Resolution
Option 1 – Disable plan polling on the affected instance
- In the DPA web console, sign in as an administrator.
- Go to Options → Advanced options.
- Click the DB instance options tab.
- Check Support options (upper right).
- Select the affected PostgreSQL instance from the dropdown.
- Find
PLANPOLL_ENABLED. - Set the value to false and click Update.
- Plan polling is disabled for that specific monitored instance, so no new plans are collected, but DPA continues to collect waits and other performance metrics.
- This avoids the data truncation on
PLAN_NODE, so PlanPollJob no longer fails and the monitor should remain stable.
Option 2 – Exclude only the problematic database(s) from PostgreSQL plan polling
-
Enable TRACE logging for plan polling:
https://<DPAserver>:8124/iwc/setLogger.iwc?logger=com.confio.idc.database.service.planpoll.AbstractPlanPollService&level=TRACEhttps://<DPAserver>:8124/iwc/setLogger.iwc?logger=com.confio.idc.database.service.planpoll.PostgreSqlPlanPollService&level=TRACE
-
Let the system run until the PlanPollJob error reproduces.
-
Collect the new DPA logs and search
idc.logfor messages like:- “Query Plan for Postgres database …”
- The same timeframe as the “String or binary data would be truncated … PLAN_NODE” errors.
-
Note the database name(s) where plans are being captured immediately prior to the truncation error. These are usually the ones with very large plans (for example, certain Citus distributed databases).
- In DPA: Options → Advanced options → DB instance options.
- Enable Support options.
- Select the same PostgreSQL instance.
- Set:
POSTGRESQL_PLAN_COLLECTION_DB_NAMES=dbname1;dbname2(semicolon separated list, including only the large‑plan DBs you identified).POSTGRESQL_PLAN_COLLECTION_DB_NAMES_FILTER=EXCLUDE.
- DPA will continue plan polling for other databases under that monitored instance.
- Plans will not be collected for the excluded databases, preventing the large plan JSON from overflowing the
PLAN_NODEcolumn and causing truncation.
Verification
-
Confirm that the PlanPollJob is no longer failing for the affected instance(s):
- Monitor logs for the absence of
String or binary data would be truncated in table '...CONPPT_xx', column 'PLAN_NODE'
andPlanPollJob failedentries.
- Monitor logs for the absence of
-
Confirm DPA monitor status:
- The monitor should remain green and should not be cycling between up and down states.
-
Confirm expected plan behavior:
- Option 1 (PLANPOLL_DISABLED): No new plans are collected for that instance.
- Option 2 (DB exclusion): Plans are collected for other databases; excluded databases no longer show new plan captures.