Applications Systems
PostgreSQL query samples are truncated in DPM
Samples of PostgreSQL query executions may have the query text truncated. The length of the captured text can usually be increased, depending on how the database is monitored.
First published date
Last published date
Overview
Product section
Cause
- For all installation types, DPM truncates query text after 4096 characters by default, in order to conserve resources on the server where the agent is running.
- If monitoring a PostgreSQL database using pg_stat_statements, such as Amazon RDS or a self-managed database using encrypted connections, sample text is truncated by PostgreSQL at a default length of 1024 characters.
Resolution
- If monitoring via packet sniffing, samples are truncated by DPM only. You can increase the amount of captured text by adding the option "max-sample-length":"4096" to your global.conf DPM configuration file. This can be set from 4096 up to 32000. Higher numbers will consume more CPU resources by the agent. By default this file is /etc/vividcortex/global.conf.
- If monitoring via pg_stat_statements, either DPM or PostgreSQL may truncate the sample text. By default, pg_stat_activity (the source for query samples) will truncate text at 1024 characters. You will need to change the server variable track_activity_query_size. Refer to the PostgreSQL documentation for more information about this variable. (© 2020 The PostgreSQL Global Development Group, available at https://www.postgresql.org/, obtained on June 4, 2020). Amazon Aurora PostgreSQL does not currently allow this setting to be changed. See the previous bullet for details on configuring DPM to capture additional query text.
Disclaimer: Please note, any content posted herein is provided as a suggestion or recommendation to you for your internal use. This is not part of the SolarWinds software or documentation that you purchased from SolarWinds, and the information set forth herein may come from third parties. Your organization should internally review and assess to what extent, if any, such custom scripts or recommendations will be incorporated into your environment. You elect to use third party content at your own risk, and you will be solely responsible for the incorporation of the same, if any.