what is pg_stat_activity.query for idle connections ?

Started by David Gauthierover 4 years ago2 messagesgeneral
Jump to latest
#1David Gauthier
davegauthierpg@gmail.com

11.3 on linux

I have a DB with a worrisome number of connections with
pg_stat_activity.query = '/* DBD::Pg ping test v3.5.3 */', all of them with
state='idle'. I have code that uses perl's ping method to ping the DB and
I suspect this is the source. Is '/* DBD::Pg ping test v3.5.3 */' the last
thing it did, but because it's idle now, it's actually doing nothing ?

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: David Gauthier (#1)
Re: what is pg_stat_activity.query for idle connections ?

David Gauthier <davegauthierpg@gmail.com> writes:

11.3 on linux
I have a DB with a worrisome number of connections with
pg_stat_activity.query = '/* DBD::Pg ping test v3.5.3 */', all of them with
state='idle'. I have code that uses perl's ping method to ping the DB and
I suspect this is the source. Is '/* DBD::Pg ping test v3.5.3 */' the last
thing it did, but because it's idle now, it's actually doing nothing ?

Yes, exactly.

regards, tom lane