pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
how can I get non-truncated version of running sql?
2+ messages / 2 participants
[nested] [flat]

* how can I get non-truncated version of running sql?
@ 2019-10-11 17:23 Julie Nishimura <juliezain@hotmail.com>
  2019-10-11 17:25 ` Re: how can I get non-truncated version of running sql? Adrian Klaver <adrian.klaver@aklaver.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Julie Nishimura @ 2019-10-11 17:23 UTC (permalink / raw)
  To: pgsql-general; pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>

How do i find the FULL query running on a postgres instance?  When I run:

SELECT datname, pid, state, query, age(clock_timestamp(), query_start) AS age
FROM pg_stat_activity
WHERE state <> 'idle'
    AND query NOT LIKE '% FROM pg_stat_activity %'
ORDER BY age;

query seems to be truncated

Thanks!

^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: how can I get non-truncated version of running sql?
  2019-10-11 17:23 how can I get non-truncated version of running sql? Julie Nishimura <juliezain@hotmail.com>
@ 2019-10-11 17:25 ` Adrian Klaver <adrian.klaver@aklaver.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Adrian Klaver @ 2019-10-11 17:25 UTC (permalink / raw)
  To: Julie Nishimura <juliezain@hotmail.com>; pgsql-general; pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>

On 10/11/19 10:23 AM, Julie Nishimura wrote:
> How do i find the FULL query running on a postgres instance? When I run:
> 
> SELECT datname, pid, state, query, age(clock_timestamp(), query_start) AS age
> FROM pg_stat_activity
> WHERE state <> 'idle'
>       AND query NOT LIKE '% FROM pg_stat_activity %'
> ORDER BY age;
> 
> query seems to be truncated

https://www.postgresql.org/docs/11/monitoring-stats.html#PG-STAT-ACTIVITY-VIEW
"query 	text 	Text of this backend's most recent query. If state is 
active this field shows the currently executing query. In all other 
states, it shows the last query that was executed. By default the query 
text is truncated at 1024 characters; this value can be changed via the 
parameter track_activity_query_size."
> 
> Thanks!
> 
> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com





^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2019-10-11 17:25 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-10-11 17:23 how can I get non-truncated version of running sql? Julie Nishimura <juliezain@hotmail.com>
2019-10-11 17:25 ` Adrian Klaver <adrian.klaver@aklaver.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox