pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Thomas Munro <thomas.munro@enterprisedb.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Kevin Grittner <kgrittn@ymail.com>
Cc: Amit Kapila <amit.kapila16@gmail.com>
Cc: Timothy Garnett <tgarnett@panjiva.com>
Cc: PostgreSQL Bugs <pgsql-bugs@postgresql.org>
Subject: Re: Re: BUG #12990: Missing pg_multixact/members files (appears to have wrapped, then truncated)
Date: Fri, 8 May 2015 22:55:28 -0300
Message-ID: <20150509015528.GQ2523@alvh.no-ip.org> (raw)
In-Reply-To: <CAEepm=1XGJVijxqG2EE=3Tb2bbrQRTvnXA6vZN1FkOZNtH=Lqw@mail.gmail.com>
References: <CAEepm=3OPzjcqdM3vm4dM0VFYW9RjMcW8u+7LFKMWArQ7=mS=A@mail.gmail.com>
	<CA+TgmoYtFwG2n61WAiSKcgEqFSXWkUr6oSyzeGD_KtUn7CvNKQ@mail.gmail.com>
	<20150507151849.GE2523@alvh.no-ip.org>
	<CA+TgmoZ1POPQNfYFL8Wv9_tT=MMmSZf5GEAqj4ieWHk+H5iRMA@mail.gmail.com>
	<CA+TgmobbaQpE6sNqT30+rz4UMH5aPraq20gko5xd2ZGajz1-Jg@mail.gmail.com>
	<20150507180045.GG2523@alvh.no-ip.org>
	<CAEepm=12OoYdLSCXAN3dT2eCFpVfUcc9WRZ59ROrFDGhevtW7g@mail.gmail.com>
	<D8A99261-9E17-436B-B08C-BDCDBB07239D@gmail.com>
	<CA+TgmoZiHwybETx8NZzPtoSjprg2Kcr-NaWGajkzcLcbVJ1pKQ@mail.gmail.com>
	<CAEepm=1XGJVijxqG2EE=3Tb2bbrQRTvnXA6vZN1FkOZNtH=Lqw@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

Thomas Munro wrote:

> I think I see why, and I think it's a bug:  if you vacuum freeze all
> your databases, MultiXactState->oldestMultiXactId finishes up equal to
> MultiXactState->nextMXact.

Uhm, that's rather silly.

> But that's not actually a multixact that exists yet, so when when
> DetermineSafeOldestOffset calls find_multixact_start, it reads a
> garbage offset (all zeros in practice since pages start out zeroed)
> and produces a garbage value for offsetStopLimit which might
> incorrectly stop you from creating any more multixacts even though
> member space is entirely empty (but it depends on where your
> nextOffset happens to be at the time).

Right.

> I think the fix is something like "if nextMXact == oldestMultiXactId,
> then there are no active multixacts, so the offsetStopLimit should be
> set to nextOffset - (a segment's worth)".

Makes sense.

-- 
Álvaro Herrera                http://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 (113+ messages)  latest in thread

Message-ID: <20150509015528.GQ2523@alvh.no-ip.org>
Permalink:  ../20150509015528.GQ2523@alvh.no-ip.org/
Also on:    postgresql.org/message-id/20150509015528.GQ2523@alvh.no-ip.org

 · 

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-bugs@postgresql.org
  Cc: alvherre@2ndquadrant.com, thomas.munro@enterprisedb.com, robertmhaas@gmail.com, kgrittn@ymail.com, amit.kapila16@gmail.com, tgarnett@panjiva.com
  Subject: Re: BUG #12990: Missing pg_multixact/members files (appears to have wrapped, then truncated)
  In-Reply-To: <20150509015528.GQ2523@alvh.no-ip.org>
  References: <CAEepm=3OPzjcqdM3vm4dM0VFYW9RjMcW8u+7LFKMWArQ7=mS=A@mail.gmail.com> <CA+TgmoYtFwG2n61WAiSKcgEqFSXWkUr6oSyzeGD_KtUn7CvNKQ@mail.gmail.com> <20150507151849.GE2523@alvh.no-ip.org> <CA+TgmoZ1POPQNfYFL8Wv9_tT=MMmSZf5GEAqj4ieWHk+H5iRMA@mail.gmail.com> <CA+TgmobbaQpE6sNqT30+rz4UMH5aPraq20gko5xd2ZGajz1-Jg@mail.gmail.com> <20150507180045.GG2523@alvh.no-ip.org> <CAEepm=12OoYdLSCXAN3dT2eCFpVfUcc9WRZ59ROrFDGhevtW7g@mail.gmail.com> <D8A99261-9E17-436B-B08C-BDCDBB07239D@gmail.com> <CA+TgmoZiHwybETx8NZzPtoSjprg2Kcr-NaWGajkzcLcbVJ1pKQ@mail.gmail.com> <CAEepm=1XGJVijxqG2EE=3Tb2bbrQRTvnXA6vZN1FkOZNtH=Lqw@mail.gmail.com> <20150509015528.GQ2523@alvh.no-ip.org>

* 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