Re: pg_stat_activity.query empty

Поиск
Список
Период
Сортировка
От Laurenz Albe
Тема Re: pg_stat_activity.query empty
Дата
Msg-id b0c734cdbd70b890cc719bdc5ab2b4512a02f522.camel@cybertec.at
обсуждение исходный текст
Ответ на Re: pg_stat_activity.query empty  ("David G. Johnston" <david.g.johnston@gmail.com>)
Ответы Re: pg_stat_activity.query empty  (Ian Lawrence Barwick <barwick@gmail.com>)
Список pgsql-general
On Tue, 2022-04-26 at 06:59 -0700, David G. Johnston wrote:
> On Tue, Apr 26, 2022 at 6:55 AM Robert Lichtenberger <r.lichtenberger@synedra.com> wrote:
> > When executing "SELECT * FROM pg_stat_activity" I get lots of rows that 
> > have an empty "query" column.
> > 
> > According to [1] this column should contain the "Text of this backend's 
> > most recent query", either a query that is currently running or the last 
> > query that was executed.
> > 
> > So how comes that a lot of the rows in pg_stat_activity have an empty 
> > "query"?
> > 
> > https://www.postgresql.org/docs/current/monitoring-stats.html#MONITORING-PG-STAT-ACTIVITY-VIEW
> 
> They've never executed a query.  Probably due to connection pooling opening connections for the pool but never
needingto hand them out.
 

An alternative option is that the last query sent was an empty string.

Yours,
Laurenz Albe




В списке pgsql-general по дате отправления:

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: pg_stat_activity.query empty
Следующее
От: Ian Lawrence Barwick
Дата:
Сообщение: Re: pg_stat_activity.query empty