pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Marko Tiikkaja <marko@joh.to>
Cc: Michael Paquier <michael.paquier@gmail.com>
Cc: PostgreSQL mailing lists <pgsql-bugs@postgresql.org>
Subject: Re: BUG #14830: Missed NOTIFications, PostgreSQL 9.1.24
Date: Tue, 10 Oct 2017 16:06:21 +0200
Message-ID: <20171010140621.u4avva4cxylwpyew@alvherre.pgsql> (raw)
In-Reply-To: <15645.1507643938@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

Tom Lane wrote:
> Marko Tiikkaja <marko@joh.to> writes:
> > So I managed to accidentally kill and/or restart both servers while trying
> > to install debug symbols, but I'm doing a new run now and I noticed
> > something interesting: the listening backend's RecentXmin doesn't seem to
> > ever go forward.  By my reading of this code, that would mean trouble for
> > this piece of code in TransactionIdIsInProgress:
> 
> >   if (TransactionIdPrecedes(xid, RecentXmin))
> >       return false;
> 
> Hmm ... I suppose it's possible that that happens if the listening
> backend isn't executing any SQL commands but is just sitting.
> While that might describe your test harness, does it describe any
> real-world application?

I think it's not totally unreasonable to have processes sitting idle for
long periods of time.  One example: a pooler configured to have more
connections that are actually needed most of the time (I'm fairly sure
I've seen this).  Would they not recompute RecentXmin if they did a
sinval reset?  Also, a listener daemon for which notifications are very
infrequent.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (15+ messages)  latest in thread

Message-ID: <20171010140621.u4avva4cxylwpyew@alvherre.pgsql>
Permalink:  ../20171010140621.u4avva4cxylwpyew@alvherre.pgsql/
Also on:    postgresql.org/message-id/20171010140621.u4avva4cxylwpyew@alvherre.pgsql

 · 

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-bugs@postgresql.org
  Cc: alvherre@alvh.no-ip.org, tgl@sss.pgh.pa.us, marko@joh.to, michael.paquier@gmail.com
  Subject: Re: BUG #14830: Missed NOTIFications, PostgreSQL 9.1.24
  In-Reply-To: <20171010140621.u4avva4cxylwpyew@alvherre.pgsql>

* 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