Postgres showing only truncated queries.

Comments

7 comments

  • Avatar
    nidhin

    Dear Team,

     

    Any update..?

  • Avatar
    Paul Namuag

    Hi Nidhin,

     

    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.

     

    Thanks.

  • Avatar
    nidhin

    Dear Paul,

     

    No issues for the delay, am also went for holidays..

    I tried to clicking the rows, but its showing only some part of the query, not the full. 

    Please find my screen shot, You can fin that the missing query is showing like ......

    Is there any other solutions for this..?

  • Avatar
    Paul Namuag

    Hi Nidhin,

     

    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,

    track_activity_query_size (integer)

    Specifies the number of bytes reserved to track the currently executing command for each active session, for the pg_stat_activity.query field. 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;

     track_activity_query_size 

    ---------------------------

     100

    (1 row)

     

    Let us know how it goes.

     

    Thanks.

  • Avatar
    nidhin

    Dear Paul,

     

    Thanks for the update,

    Am trying to list the full queries in the cluster control interface and its not getting.

  • Avatar
    Paul Namuag

    Hi Nidhin,

     

    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.

  • Avatar
    nidhin

    Dear Paul,

     

    Thanks for the update.

Please sign in to leave a comment.

Powered by Zendesk