Postgres showing only truncated queries.
Postgres showing only truncated queries in "Running Queries", am not able to view my full running queries from the interface.
Is there any solution for this..?
Apologies for the delayed response due to holidays and overlooked this request.
Have you tried clicking the rows that has the query you want to view? For example, see my screenshot below:
That will show you the full queries.
Let us know if that solves the problem.
I just got our devs feedback and it looks that this is not ClusterControl thing but on the PostgreSQL side since it relies on pg_stat_activity output. To fix this, try increasing the variable track_activity_query_size which is defined as,
Specifies the number of bytes reserved to track the currently executing command for each active session, for the
queryfield. The default value is 1024. This parameter can only be set at server start.
The downside though, it needs a server restart. So you can't do this in a production node unless it's under maintenance.
So set it to a higher value than the current value it has. It works in my end as I tested it setting it lower though:
where variable has only 100:
postgres=# show track_activity_query_size;
Let us know how it goes.
As what I've mentioned earlier, the ClusterControl does not have control of the truncated queries but it needs to be adjusted to the PostgreSQL node itself. You have to set the variable track_activity_query_size in your pg_hba.conf and then try to restart the node. Ensure that the node is not under prod or is on maintenance mode.
Please sign in to leave a comment.