pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@2ndquadrant.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Bruce Momjian <bruce@momjian.us>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: PostgreSQL Bugs <pgsql-bugs@postgresql.org>
Subject: Re: pg_upgrade < 9.3 -> >=9.3 misses a step around multixacts
Date: Mon, 21 Jul 2014 18:48:57 +0200
Message-ID: <20140721164857.GO5974@alap3.anarazel.de> (raw)
In-Reply-To: <4182.1405961004@sss.pgh.pa.us>
References: <18851.1405897900@sss.pgh.pa.us>
	<20140720233125.GI5974@alap3.anarazel.de>
	<19458.1405899435@sss.pgh.pa.us>
	<20140720234925.GJ5974@alap3.anarazel.de>
	<22178.1405903964@sss.pgh.pa.us>
	<26504.1405912770@sss.pgh.pa.us>
	<20140721161222.GA17049@alap3.anarazel.de>
	<3655.1405959656@sss.pgh.pa.us>
	<20140721163409.GB14989@alap3.anarazel.de>
	<4182.1405961004@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

On 2014-07-21 12:43:24 -0400, Tom Lane wrote:
> Andres Freund <andres@2ndquadrant.com> writes:
> > I'm not wondering so much about vac_update_relstats(). There indeed the
> > calls aren't new and the worst that can happen is a slightly older
> > freeze limit. I'm more wondering about vac_update_datfrozenxid(). Afaics
> > we very well could hit
> > 	newFrozenXid = lastSaneFrozenXid = GetOldestXmin(NULL, true);
> > 	newMinMulti = lastSaneMinMulti = GetOldestMultiXactId();
> > for a relation that has just been vacuumed by another backend.
>
> Hmm ... I see.  The issue is not what the computed minimum datfrozenxid
> etc should be; it's right to err in the backwards direction there.
> It's whether we want to declare that the calculation is bogus and abandon
> truncation if another session manages to sneak in a very-new relfrozenxid.
> Yeah, you're right, we need to be conservative about doing that.  I'd
> wanted to avoid extra calls here but I guess we have to do them after all.
> Will fix.

I wonder if GetTopTransactionId()/MultiXactIdSetOldestMember() and using
lastSane* = ReadNew* isn't sufficient. After the xid assignment
concurrent GetOldest* can't go below the ReadNew* values anymore, right?

Greetings,

Andres Freund

--
 Andres Freund	                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, 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 (78+ messages)  latest in thread

Message-ID: <20140721164857.GO5974@alap3.anarazel.de>
Permalink:  ../20140721164857.GO5974@alap3.anarazel.de/
Also on:    postgresql.org/message-id/20140721164857.GO5974@alap3.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 using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: andres@2ndquadrant.com, tgl@sss.pgh.pa.us, bruce@momjian.us, alvherre@2ndquadrant.com
  Subject: Re: pg_upgrade < 9.3 -> >=9.3 misses a step around multixacts
  In-Reply-To: <20140721164857.GO5974@alap3.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