From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | depesz(at)depesz(dot)com |
Cc: | Kaijiang Chen <chenkaijiang(at)gmail(dot)com>, Pg Bugs <pgsql-bugs(at)postgresql(dot)org> |
Subject: | Re: Fwd: weird long time query |
Date: | 2019-12-18 16:30:43 |
Message-ID: | 5855.1576686643@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs pgsql-general pgsql-performance |
hubert depesz lubaczewski <depesz(at)depesz(dot)com> writes:
> On Thu, Dec 19, 2019 at 12:14:26AM +0800, Kaijiang Chen wrote:
>> BTW, I got the similar result (still see that proc) with "select * from
>> pg_stat_activity":
>> ...
>> state | idle
>> ...
>> query | DEALLOCATE pdo_stmt_00000388
>>
>> Looks not very nice :-)
> not sure what you mean by not nice.
That's a feature not a bug (and yes, the behavior is documented).
People requested that the view continue to display the last query
of an idle session. IIRC, the main argument was that otherwise
it's hard to tell apart a bunch of idle sessions.
If you don't like it, you can always do something like
case when state = idle then null else query end
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Steven Lembark | 2019-12-18 18:07:28 | Re: How to prevent POSTGRES killing linux system from accepting too much inserts? |
Previous Message | hubert depesz lubaczewski | 2019-12-18 16:23:49 | Re: Fwd: weird long time query |
From | Date | Subject | |
---|---|---|---|
Next Message | Justin | 2019-12-18 16:43:50 | Re: Tuple concurrency issue in large objects |
Previous Message | hubert depesz lubaczewski | 2019-12-18 16:23:49 | Re: Fwd: weird long time query |
From | Date | Subject | |
---|---|---|---|
Next Message | Steven Lembark | 2019-12-18 18:07:28 | Re: How to prevent POSTGRES killing linux system from accepting too much inserts? |
Previous Message | hubert depesz lubaczewski | 2019-12-18 16:23:49 | Re: Fwd: weird long time query |