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 14:12:56 -0400
Message-ID: <21502.1557339176@sss.pgh.pa.us> (raw)
In-Reply-To: <CAPR3Wj5CUVNqF2r6fNnrueDgn2k+qyADCvYZ2878SCytTrPPng@mail.gmail.com>
References: <CAPR3Wj5Z17=+eeyrn_ZDG3NQGYgMEOY6JV6Y-WRRhGgwc16U3Q@mail.gmail.com>
<15877.1557178386@sss.pgh.pa.us>
<CAPR3Wj5CUVNqF2r6fNnrueDgn2k+qyADCvYZ2878SCytTrPPng@mail.gmail.com>
neeraj kumar <neeru.cse@gmail.com> writes:
> Took some time to get stack trace as we didn't had root permission.
> Attaching stack trace of two process (out of many) stuck for same query
> below[1][2]
Hmm, the line numbers in your stack traces don't agree with either v10
or HEAD branches for me. But assuming that you've correctly identified
where it's stuck:
> Seems like call is unable to come out of this loop :
> https://github.com/postgres/postgres/blob/master/src/backend/postmaster/pgstat.c#L3361-L3400
the only really obvious theory is that some process left its
st_changecount odd, which would more or less have to imply that
something threw an error between pgstat_increment_changecount_before
and pgstat_increment_changecount_after. There's only one place
where that seems very plausible, namely pgstat_bestart, which is
doing a rather scary amount of stuff in between. Are you using
either SSL or GSS?
regards, tom lane
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: <21502.1557339176@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