From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Julie Nishimura <juliezain@hotmail.com>
To: pgsql-general <pgsql-general@postgresql.org>
To: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: how can I get non-truncated version of running sql?
Date: Fri, 11 Oct 2019 10:25:13 -0700
Message-ID: <10569e7e-9cda-e2ad-c68b-957fbce7ab98@aklaver.com> (raw)
In-Reply-To: <BYAPR08MB50143AD05A6257499AB3EEA6AC970@BYAPR08MB5014.namprd08.prod.outlook.com>
References: <BYAPR08MB50143AD05A6257499AB3EEA6AC970@BYAPR08MB5014.namprd08.prod.outlook.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: adrian.klaver@aklaver.com, juliezain@hotmail.com
Subject: Re: how can I get non-truncated version of running sql?
In-Reply-To: <10569e7e-9cda-e2ad-c68b-957fbce7ab98@aklaver.com>
References: <BYAPR08MB50143AD05A6257499AB3EEA6AC970@BYAPR08MB5014.namprd08.prod.outlook.com> <10569e7e-9cda-e2ad-c68b-957fbce7ab98@aklaver.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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