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 01:12:14 +0200
Message-ID: <20140720231214.GH5974@alap3.anarazel.de> (raw)
In-Reply-To: <18673.1405897470@sss.pgh.pa.us>
References: <20140720204852.GB5974@alap3.anarazel.de>
	<15685.1405891368@sss.pgh.pa.us>
	<20140720213258.GD5974@alap3.anarazel.de>
	<16274.1405892584@sss.pgh.pa.us>
	<20140720220253.GE5974@alap3.anarazel.de>
	<17255.1405894611@sss.pgh.pa.us>
	<20140720223010.GF5974@alap3.anarazel.de>
	<17935.1405895946@sss.pgh.pa.us>
	<20140720225653.GG5974@alap3.anarazel.de>
	<18673.1405897470@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

On 2014-07-20 19:04:30 -0400, Tom Lane wrote:
> Andres Freund <andres@2ndquadrant.com> writes:
> > If any *single* full table vacuum after that calls
> > vac_update_datfrozenxid() which just needs its datfrozenxid advance by
> > one we're in trouble: vac_truncate_clog() will be called with minMulti =
> > GetOldestMultiXactId().
> 
> Uh, no, the cutoff is GetOldestMultiXactId minus
> vacuum_multixact_freeze_min_age (or the autovac equivalent).
> See vacuum_set_xid_limits.

Unfortunately not :(. The stuff computed in vacuum_set_xid_limits isn't
used for truncation - which normally is sane because another database
might be further behind.

void
vac_update_datfrozenxid(void)
{
...
	MultiXactId newMinMulti;
...
	/*
	 * Similarly, initialize the MultiXact "min" with the value that would be
	 * used on pg_class for new tables.  See AddNewRelationTuple().
	 */
	newMinMulti = GetOldestMultiXactId();
...
	while ((classTup = systable_getnext(scan)) != NULL)
	{
...
		if (MultiXactIdPrecedes(classForm->relminmxid, newMinMulti))
			newMinMulti = classForm->relminmxid;
	}
...
        if (dirty || ForceTransactionIdLimitUpdate())
		vac_truncate_clog(newFrozenXid, newMinMulti);
}

But even if it were, I don't really see how that changes anything?

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: <20140720231214.GH5974@alap3.anarazel.de>
Permalink:  ../20140720231214.GH5974@alap3.anarazel.de/
Also on:    postgresql.org/message-id/20140720231214.GH5974@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: <20140720231214.GH5974@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