Re: Re: BUG #12990: Missing pg_multixact/members files (appears to have wrapped, then truncated)

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>, Timothy Garnett <tgarnett(at)panjiva(dot)com>, Postgres-Bugs <pgsql-bugs(at)postgresql(dot)org>, Kevin Grittner <kgrittn(at)ymail(dot)com>
Subject: Re: Re: BUG #12990: Missing pg_multixact/members files (appears to have wrapped, then truncated)
Date: 2015-04-28 14:56:14
Message-ID: 20150428145614.GA4369@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


I sure wish this had arrived two minutes earlier ...

Robert Haas wrote:

> Putting the period inside the parentheses here looks weird?
>
> + "This command would create a
> multixact with %u members, which exceeds remaining space (%u
> members.)",
>
> Maybe rephrase as: "This command would create a multixact with %u
> members, but the remaining space is only enough for %u members."

WFM, will change.

> I don't think this should have a comma:
>
> + errhint("Execute a database-wide VACUUM in that
> database, with reduced vacuum_multixact_freeze_min_age and
> vacuum_multixact_freeze_table_age settings.")));

Ditto.

> This looks like excess brace-ifiaction:
>
> + if (start < boundary)
> + {
> + return finish >= boundary || finish < start;
> + }
> + else
> + {
> + return finish >= boundary && finish < start;
> + }

Yeah, agreed. Will undo that change. (I disliked the comment above the
indented single-statement, so added braces, but then moved the comment.
I should have removed the braces at that point.)

> I think this is confusing:
>
> +/*
> + * Read the offset of the first member of the given multixact.
> + */
>
> This is confusing to me because the two subdirectories of pg_multixact
> are called "members" and "offsets". Here you are talking about the
> offset of the first member. Maybe I'm just slow, but that seems like
> conflating terminology. You end up with a function called
> read_offset_for_multi() that is actually looking up information about
> members. Ick.

Yeah, I introduced the confusing terminology while inventing multixacts
initially and have regretted it many times. I will think about a better
name for this. (Meanwhile, on IM Robert suggested
find_start_of_first_multi_member)

--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Robert Haas 2015-04-28 16:04:47 Re: Re: BUG #12990: Missing pg_multixact/members files (appears to have wrapped, then truncated)
Previous Message Alvaro Herrera 2015-04-28 14:35:21 Re: Re: BUG #12990: Missing pg_multixact/members files (appears to have wrapped, then truncated)