Search Postgresql Archives

Re: Query stucked in pg_stat_activity

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Csaba Nagy <nagy@xxxxxxxxxxxxxx> writes:
> On our first test run everything went fine, the only strange thing is a
> row in the pg_stat_activity, which has a row about a query which is long
> gone, the process pointed by the procpid field is not existing.

This is not totally surprising, since the pgstat mechanism is by design
not 100% reliable (it will drop statistics messages under high load
rather than making backends wait for the stats collector).  Probably the
backend-is-exiting message for that process got dropped.

Eventually that backend slot will get re-used for another backend, and
then the entry will go away, but if it's a high-number slot then it'll
take a similar load level to get to it.

> I've executed a "select pg_stat_reset();" as superuser, and all went
> away except the offending row...

That only resets the I/O counts (and only for one database), not the
backend activity info.

			regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faq

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux