pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: neeraj kumar <neeru.cse@gmail.com>
Cc: pgsql-admin@postgresql.org
Cc: pgsql-general@postgresql.org
Subject: Re: Query on pg_stat_activity table got stuck
Date: Wed, 08 May 2019 17:58:52 -0400
Message-ID: <29660.1557352732@sss.pgh.pa.us> (raw)
In-Reply-To: <CAPR3Wj4fT1hOumweROsAifTAMLT7oM+YejxBAcpPsXuMAecBZw@mail.gmail.com>
References: <CAPR3Wj5Z17=+eeyrn_ZDG3NQGYgMEOY6JV6Y-WRRhGgwc16U3Q@mail.gmail.com>
	<15877.1557178386@sss.pgh.pa.us>
	<CAPR3Wj5CUVNqF2r6fNnrueDgn2k+qyADCvYZ2878SCytTrPPng@mail.gmail.com>
	<21502.1557339176@sss.pgh.pa.us>
	<CAPR3Wj4fT1hOumweROsAifTAMLT7oM+YejxBAcpPsXuMAecBZw@mail.gmail.com>

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





view thread (18+ messages)  latest in thread

Message-ID: <29660.1557352732@sss.pgh.pa.us>
Permalink:  ../29660.1557352732@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/29660.1557352732@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, neeru.cse@gmail.com, pgsql-general@postgresql.org
  Subject: Re: Query on pg_stat_activity table got stuck
  In-Reply-To: <29660.1557352732@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox