From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Thomas Munro <thomas.munro@enterprisedb.com>
Cc: Amit Kapila <amit.kapila16@gmail.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Timothy Garnett <tgarnett@panjiva.com>
Cc: PostgreSQL Bugs <pgsql-bugs@postgresql.org>
Cc: Kevin Grittner <kgrittn@ymail.com>
Subject: Re: Re: BUG #12990: Missing pg_multixact/members files (appears to have wrapped, then truncated)
Date: Mon, 4 May 2015 17:59:49 -0300
Message-ID: <20150504205949.GE2523@alvh.no-ip.org> (raw)
In-Reply-To: <CAEepm=3iK_JrM3=pFzTU-L3c+g61R6Dg5H7R3bsD9CMdYTLRjA@mail.gmail.com>
References: <20150428062352.GW4368@alvh.no-ip.org>
<CAEepm=0doaxbMLN8XRtptNGrO6_jYQM67dQhiXL0HDVBW8S+BQ@mail.gmail.com>
<CAEepm=13WNtTQkhCbU9NoFXQ_HCA8QZmoZvS52g=LT1cuMwE2Q@mail.gmail.com>
<CAA4eK1KswLU14DXmOQogjanD_0v83CznyG6R5rKx5brO=uk_VQ@mail.gmail.com>
<CAEepm=2W9LyVy5ASPtH7cLnKsFnw5KGo3vRyteLXYhe=C+6ywQ@mail.gmail.com>
<CAEepm=3fvWMcJdSwNZCix2pQruDste0LUC5eP8e0i8+4QtG=vw@mail.gmail.com>
<CA+TgmoY=ntXN56XSqxpc8Ef_Uvssi2X1Thmh6bOGFXraa8usZQ@mail.gmail.com>
<CAEepm=2Dz3E46RpPbxtt4xmujxaOe-8SH+sXoE0bWx+RCuLgpw@mail.gmail.com>
<CAA4eK1+VNdBs+PKHqfnSvzzrA=qzes5vi7B1e3KhCfC-HRnc3w@mail.gmail.com>
<CAEepm=3iK_JrM3=pFzTU-L3c+g61R6Dg5H7R3bsD9CMdYTLRjA@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
So I might have understood an earlier description of the proposed
solution all wrong, or this patch was designed without consideration to
that description. What I thought would happen is that all freeze ages
would get multiplied by some factor <= 1, depending on the space used up
by members. If members space usage is low enough, factor would remain
at 1 so things would behave as today. If members space usage is larger
than X, the factor decreases smoothly and this makes freeze_min_age and
freeze_max_age decrease smoothly as well, for all vacuums equally.
For instance, we could choose a method to compute X based on considering
that a full 2^32 storage area for members is enough to store one
vacuum_multixact_freeze_table_age cycle of multixacts. The default
value of this param is 150 million, and 2^32/150000000 = 28; so if your
average multixact size = 38, you would set the multiplier at 0.736 and
your effective freeze_table_age would become 110 million and effective
freeze_min_age would become 3.68 million.
As a secondary point, I find variable-names-as-documentation bad
practice. Please don't use a long name such as
max_multixact_age_to_avoid_member_wrap; code becomes unwieldy. A short
name such as safe_mxact_age preceded by a comment /* this variable is
the max that avoids member wrap */ seems more palatable; side-by-side
merges and all that! I don't think long function names are as
problematic (though the name of your new function is still a bit too
long).
Please note that 9.4 and earlier do not have ExecVacuum; the
determination of freeze ages is done partly in gram.y (yuck). Not sure
what will the patch look like in those branches.
--
Á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
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, amit.kapila16@gmail.com, robertmhaas@gmail.com, tgarnett@panjiva.com, kgrittn@ymail.com
Subject: Re: BUG #12990: Missing pg_multixact/members files (appears to have wrapped, then truncated)
In-Reply-To: <20150504205949.GE2523@alvh.no-ip.org>
References: <20150428062352.GW4368@alvh.no-ip.org> <CAEepm=0doaxbMLN8XRtptNGrO6_jYQM67dQhiXL0HDVBW8S+BQ@mail.gmail.com> <CAEepm=13WNtTQkhCbU9NoFXQ_HCA8QZmoZvS52g=LT1cuMwE2Q@mail.gmail.com> <CAA4eK1KswLU14DXmOQogjanD_0v83CznyG6R5rKx5brO=uk_VQ@mail.gmail.com> <CAEepm=2W9LyVy5ASPtH7cLnKsFnw5KGo3vRyteLXYhe=C+6ywQ@mail.gmail.com> <CAEepm=3fvWMcJdSwNZCix2pQruDste0LUC5eP8e0i8+4QtG=vw@mail.gmail.com> <CA+TgmoY=ntXN56XSqxpc8Ef_Uvssi2X1Thmh6bOGFXraa8usZQ@mail.gmail.com> <CAEepm=2Dz3E46RpPbxtt4xmujxaOe-8SH+sXoE0bWx+RCuLgpw@mail.gmail.com> <CAA4eK1+VNdBs+PKHqfnSvzzrA=qzes5vi7B1e3KhCfC-HRnc3w@mail.gmail.com> <CAEepm=3iK_JrM3=pFzTU-L3c+g61R6Dg5H7R3bsD9CMdYTLRjA@mail.gmail.com> <20150504205949.GE2523@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