Re: Query on pg_stat_activity table got stuck

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: neeraj kumar <neeru(dot)cse(at)gmail(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org, pgsql-general(at)postgresql(dot)org
Subject: Re: Query on pg_stat_activity table got stuck
Date: 2019-05-08 21:58:52
Message-ID: 29660.1557352732@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-general

neeraj kumar <neeru(dot)cse(at)gmail(dot)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

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Hoa Phan 2019-05-09 07:48:00 How to create a postgres user that auth by AUTH_REQ_MD5
Previous Message neeraj kumar 2019-05-08 21:21:06 Re: Query on pg_stat_activity table got stuck

Browse pgsql-general by date

  From Date Subject
Next Message Julie Nishimura 2019-05-08 23:35:09 Re: postgresql 9.4 restart
Previous Message Ron 2019-05-08 21:23:06 Re: Oracle Migration Approach (Open source vs Vendor Specific)