Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Queries in pg_stat_activity are truncated

Tags:

postgresql

Yes, I know there is a stack overflow question with the exact same name:

Queries in pg_stat_activity are truncated?

I set this value to 7168, rebooted the server, and verified it with show track_activity_query_size. It actually shortened the amount of text shown, its now truncating at 256 characters.

What am I missing?

Edit: My database is an AWS RDS instance (db.t2.small) runningPostgreSQL 9.3.6

like image 777
Ring Avatar asked Jun 02 '15 16:06

Ring


People also ask

What is Pg_stat_activity in PostgreSQL?

pg_stat_activity is a system view that allows you to identify active SQL queries in AnalyticDB for PostgreSQL instances. The pg_stat_activity view shows a server process and its related session and query in each row.

What does pg_ stat_ activity show?

The view pg_stat_activity shows one row per server process with details about the associated user session and query. The columns that report data on the current query are available unless the parameter stats_command_string has been turned off.

What is Backend_xmin?

backend_xid means Top-level transaction identifier of this backend, if any. backend_xmin means The current backend's xmin horizon.


1 Answers

I was using PGAdmin. The query actually was returning a larger value, but PGAdmin was truncating it and I was copy/pasting it from the column out. The solution (for anybody else having this problem) is to use Query -> execute to file. This will write the full results, which you can then look at in the CSV file that it writes.

like image 132
Ring Avatar answered Sep 22 '22 12:09

Ring