Re: how can I get non-truncated version of running sql?

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Julie Nishimura <juliezain(at)hotmail(dot)com>, pgsql-general <pgsql-general(at)postgresql(dot)org>, "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: how can I get non-truncated version of running sql?
Date: 2019-10-11 17:25:13
Message-ID: 10569e7e-9cda-e2ad-c68b-957fbce7ab98@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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(dot)klaver(at)aklaver(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message wambacher 2019-10-11 17:28:09 got error: DELETE FROM planet_osm_line WHERE osm_id = -390840 failed: FEHLER: tuple concurrently updated
Previous Message Julie Nishimura 2019-10-11 17:23:05 how can I get non-truncated version of running sql?