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: Jeremy Schneider <schnjere@amazon.com>
Cc: pgsql-admin@postgresql.org
Cc: pgsql-general@postgresql.org
Subject: Re: Query on pg_stat_activity table got stuck
Date: Thu, 09 May 2019 23:25:01 -0400
Message-ID: <32704.1557458701@sss.pgh.pa.us> (raw)
In-Reply-To: <CAPR3Wj4af3Lpu61DUdB8eri3TQhHLhcKY-q2bTRVLKAmj8h1Ug@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>
	<29660.1557352732@sss.pgh.pa.us>
	<e99f759e-4d18-d297-9e1a-639c7379faf2@amazon.com>
	<30687.1557432052@sss.pgh.pa.us>
	<CAPR3Wj4af3Lpu61DUdB8eri3TQhHLhcKY-q2bTRVLKAmj8h1Ug@mail.gmail.com>

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





view thread (18+ messages)  latest in thread

Message-ID: <32704.1557458701@sss.pgh.pa.us>
Permalink:  ../32704.1557458701@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/32704.1557458701@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, schnjere@amazon.com, pgsql-general@postgresql.org
  Subject: Re: Query on pg_stat_activity table got stuck
  In-Reply-To: <32704.1557458701@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