Search code examples
sqlpostgresqlpostgresql-9.4pg

How to show full execution query - PostgreSQL


I have some heavy queries in my server and I want to copy the full query (more than 1024 characters).

But the field from view pg_stat_activity dont show me more than 2014.

I saw that I can change the postgres server parameter track_activity_query_size, but I dont want to restart my server to apply it, and I am not sure if it works really. So, there is another table, view, function, or something I want to find it? The full execution query.

Thanks!


Solution

  • All the views and functions that show the query string only seep a maximum of track_activity_query_size characters.

    Unless you want to use the log file, as "a horse with no name" suggested, you'll have to restart the server.