pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Robert Haas <robertmhaas@gmail.com>
To: Thomas Munro <thomas.munro@enterprisedb.com>
Cc: Alvaro Herrera <alvherre@2ndquadrant.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: Wed, 6 May 2015 22:44:31 -0400
Message-ID: <26622F69-38AB-479C-9155-8CAE65DBF9B6@gmail.com> (raw)
In-Reply-To: <CAEepm=10MwoFjdDgTeGUh6QO0QG89OE3c7tkbenRYLXF2t0OkA@mail.gmail.com>
References: <CA+TgmoZGz04p2ZiikO5pF91qyOhE4WiYuBJowSOd6eFNQb3tGg@mail.gmail.com>
	<789650107.1373029.1430772107036.JavaMail.yahoo@mail.yahoo.com>
	<CAEepm=27TCZk3enwgvMEum4XvUTG-JoZAvat7fUvNM+eRw-H1g@mail.gmail.com>
	<CA+TgmoZkM=aJMwD6iFRi+xo3O73=RrY+oRRuPhpXTwPTU-TU8A@mail.gmail.com>
	<CAEepm=2Q_QSLjDBnwqU6cWZk-k_3QvnmVc3JCZCBHfh0BDVb_A@mail.gmail.com>
	<CA+Tgmoap6-o_5ESu5X2mBRVht_F+KNoY+oO12OvV_WekSA=ezQ@mail.gmail.com>
	<CA+TgmoaR67gP-QBOhfWRod_E-7YKudSEo84-Z=_0PycnetgBuw@mail.gmail.com>
	<20150506143418.GT2523@alvh.no-ip.org>
	<CA+TgmoZH5yBwa98oeuipxUN0m_U2+Yd9kdRY+CcZtT9Q=R8MZA@mail.gmail.com>
	<CAEepm=10MwoFjdDgTeGUh6QO0QG89OE3c7tkbenRYLXF2t0OkA@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

On May 6, 2015, at 9:48 PM, Thomas Munro <thomas.munro@enterprisedb.com> wrote:
>> On Thu, May 7, 2015 at 4:23 AM, Robert Haas <robertmhaas@gmail.com> wrote:
>> On Wed, May 6, 2015 at 10:34 AM, Alvaro Herrera <alvherre@2ndquadrant.com> wrote:
>>>> 2. Doesn't the code that sets MultiXactState->multiVacLimit also need
>>>> to use what I'm now calling MultiXactMemberFreezeThreshold() - or some
>>>> similar logic?  Otherwise, a user with autovacuum=off won't get
>>>> emergency autovacuums for member exhaustion, even though they will get
>>>> them for offset exhaustion.
>>> 
>>> Yeah, it looks like it does.
>> 
>> OK, I'm not clear how to do that correctly, exactly, but hopefully one
>> of us can figure that out.
> 
> MultiXactState->multiVacLimit holds the multixact IDs at which an age
> thresholds will be crossed, so that GetNewMultiXactId can check it
> cheaply.  But we can't predict the future multixact IDs at which our
> member usage threshold will be crossed.  We could try to estimate it
> based on past multixact sizes, but (as I think we already covered
> somewhere else) we shouldn't be trying to do that because it wouldn't
> handle the situation where your member space consumption rate suddenly
> went up, among other problems.
> 
> How about this:  we add oldestOffset to MultiXactState, to be set by
> DetermineSafeOldestOffset, and then at the place where
> GetNewMultiXactId checks if (!MultiXactIdPrecedes(result,
> MultiXactState->multiVacLimit) it could also check whether (nextOffset
> - MultiXactState->oldestOffset > MULTIXACT_MEMBER_SAFE_THRESHOLD).
> ReadMultiXactCounts should also use the oldestOffset value directly
> from shmem instead of calling find_multixact_start.

That sounds pretty good.

...Robert

-- 
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: <26622F69-38AB-479C-9155-8CAE65DBF9B6@gmail.com>
Permalink:  ../26622F69-38AB-479C-9155-8CAE65DBF9B6@gmail.com/
Also on:    postgresql.org/message-id/26622F69-38AB-479C-9155-8CAE65DBF9B6@gmail.com

 · 

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: robertmhaas@gmail.com, thomas.munro@enterprisedb.com, alvherre@2ndquadrant.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: <26622F69-38AB-479C-9155-8CAE65DBF9B6@gmail.com>
  References: <CA+TgmoZGz04p2ZiikO5pF91qyOhE4WiYuBJowSOd6eFNQb3tGg@mail.gmail.com> <789650107.1373029.1430772107036.JavaMail.yahoo@mail.yahoo.com> <CAEepm=27TCZk3enwgvMEum4XvUTG-JoZAvat7fUvNM+eRw-H1g@mail.gmail.com> <CA+TgmoZkM=aJMwD6iFRi+xo3O73=RrY+oRRuPhpXTwPTU-TU8A@mail.gmail.com> <CAEepm=2Q_QSLjDBnwqU6cWZk-k_3QvnmVc3JCZCBHfh0BDVb_A@mail.gmail.com> <CA+Tgmoap6-o_5ESu5X2mBRVht_F+KNoY+oO12OvV_WekSA=ezQ@mail.gmail.com> <CA+TgmoaR67gP-QBOhfWRod_E-7YKudSEo84-Z=_0PycnetgBuw@mail.gmail.com> <20150506143418.GT2523@alvh.no-ip.org> <CA+TgmoZH5yBwa98oeuipxUN0m_U2+Yd9kdRY+CcZtT9Q=R8MZA@mail.gmail.com> <CAEepm=10MwoFjdDgTeGUh6QO0QG89OE3c7tkbenRYLXF2t0OkA@mail.gmail.com> <26622F69-38AB-479C-9155-8CAE65DBF9B6@gmail.com>

* 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