pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@anarazel.de>
To: Simon Riggs <simon@2ndQuadrant.com>
Cc: pgsql-committers <pgsql-committers@postgresql.org>
Subject: Re: pgsql: Avoid archiving XLOG_RUNNING_XACTS on idle server
Date: Mon, 4 Apr 2016 08:42:02 +0200
Message-ID: <20160404064202.GE2431@awork2.anarazel.de> (raw)
In-Reply-To: <CANP8+jKoFKXvCZeNUG=TaCtg_YCZp-PDMffO86PG8h=wyF3R0g@mail.gmail.com>
References: <E1amxqq-0001cw-2x@gemulon.postgresql.org>
	<20160404062450.GB2431@awork2.anarazel.de>
	<CANP8+jKoFKXvCZeNUG=TaCtg_YCZp-PDMffO86PG8h=wyF3R0g@mail.gmail.com>
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>

On 2016-04-04 07:31:46 +0100, Simon Riggs wrote:
> On 4 April 2016 at 07:24, Andres Freund <andres@anarazel.de> wrote:
> 
> > On 2016-04-04 06:19:04 +0000, Simon Riggs wrote:
> > > Avoid archiving XLOG_RUNNING_XACTS on idle server
> > >
> > > If archive_timeout > 0 we should avoid logging XLOG_RUNNING_XACTS if
> > idle.
> > >
> > > Bug 13685 reported by Laurence Rowe, investigated in detail by Michael
> > Paquier,
> > > though this is not his proposed fix.
> > > 20151016203031.3019.72930@wrigleys.postgresql.org
> > >
> > > Simple non-invasive patch to allow later backpatch to 9.4 and 9.5
> >
> > Uh. This is wrong.
> 
> 
> For one it breaks cleanup with logical decoding which
> > does *NEED* to know that nothing is happening. Although only once, not
> > repeatedly.
> >
> 
> If the patch did that, I agree it would be wrong. It doesn't,
> deliberately.

It doesn't?

+       if (running->xcnt == 0 &&
+           nlocks == 0 &&
+           XLogArchiveTimeout > 0 &&
+           !last_snapshot_overflowed)
+       {
+           LWLockRelease(XidGenLock);
+           return InvalidXLogRecPtr;
+       }

Overflowed snapshots aren't a problem for logical decoding. But we need
to know that no old transactions are running occasionally.

Andres


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



view thread (25+ messages)  latest in thread

Message-ID: <20160404064202.GE2431@awork2.anarazel.de>
Permalink:  ../20160404064202.GE2431@awork2.anarazel.de/
Also on:    postgresql.org/message-id/20160404064202.GE2431@awork2.anarazel.de

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: andres@anarazel.de, simon@2ndQuadrant.com
  Subject: Re: pgsql: Avoid archiving XLOG_RUNNING_XACTS on idle server
  In-Reply-To: <20160404064202.GE2431@awork2.anarazel.de>
  References: <E1amxqq-0001cw-2x@gemulon.postgresql.org> <20160404062450.GB2431@awork2.anarazel.de> <CANP8+jKoFKXvCZeNUG=TaCtg_YCZp-PDMffO86PG8h=wyF3R0g@mail.gmail.com> <20160404064202.GE2431@awork2.anarazel.de>

* 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