Re: Query on pg_stat_activity table got stuck - Mailing list pgsql-admin

From Tom Lane
Subject Re: Query on pg_stat_activity table got stuck
Date
Msg-id 32704.1557458701@sss.pgh.pa.us
Whole thread Raw
In response to Re: Query on pg_stat_activity table got stuck  (neeraj kumar <neeru.cse@gmail.com>)
Responses Re: Query on pg_stat_activity table got stuck  (neeraj kumar <neeru.cse@gmail.com>)
Re: Query on pg_stat_activity table got stuck  (neeraj kumar <neeru.cse@gmail.com>)
List pgsql-admin
neeraj kumar <neeru.cse@gmail.com> writes:
> We got more information about this issue. There is one backend process
> still present into beentry which has changecount as odd value. However this
> process is long gone/terminated. It means when this process was
> killed/terminated its entry was not cleaned from beentry list. There seems
> to be some shutdown hook which cleans beentry if process is
> killed/terminated that somehow was not kicked off ?

No, that's the point: there isn't any such cleanup code.  The design
idea here was that we'd only have short straight-line code segments
with no possible way to throw an error while changecount is odd.
Then somebody abused the heck out of that ...

            regards, tom lane



pgsql-admin by date:

Previous
From: neeraj kumar
Date:
Subject: Re: Query on pg_stat_activity table got stuck
Next
From: neeraj kumar
Date:
Subject: Re: Query on pg_stat_activity table got stuck