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 29660.1557352732@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
Re: Query on pg_stat_activity table got stuck
List pgsql-admin
neeraj kumar <neeru.cse@gmail.com> writes:
> Yes we use SSL to connect to DB.

Hm.  I'm suspicious that one of the functions that fetch data for
an SSL connection threw an error.  In particular, it doesn't look
to be hard at all to make X509_NAME_to_cstring fall over --- an
encoding conversion failure would do it, even without any stretchy
assumptions about OOM this early in backend start.  Have you got
any SSL certificates floating around with non-ASCII subject name
or issuer name?

> From comment seems like each backend should have its own copy
> of PgBackendStatus, it means st_changecount should be different for each
> process. If st_changecount was corrupted for 1/2 process, how can it impact
> newly created process. So could you please help to understand then how come
> if we run new query via new console (means new process) that also is
> getting stuck.

No, that field is in shared memory.  The easiest way to get it reset
would be to restart the postmaster.  It's possible you could do it
without that, by starting enough sessions so that one of them takes
up the broken pg_stat_activity slot.

            regards, tom lane



pgsql-admin by date:

Previous
From: neeraj kumar
Date:
Subject: Re: Query on pg_stat_activity table got stuck
Next
From: Hoa Phan
Date:
Subject: How to create a postgres user that auth by AUTH_REQ_MD5