Re: Freeze avoidance of very large table.

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Josh Berkus <josh(at)agliodbs(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Petr Jelinek <petr(at)2ndquadrant(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Greg Stark <stark(at)mit(dot)edu>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
Subject: Re: Freeze avoidance of very large table.
Date: 2015-10-08 17:35:24
Message-ID: CANP8+jJVfk+KVpEDYQ9AuMfutkwGmHOhtsy=aQaWRS7qeSa7HQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 1 October 2015 at 23:30, Josh Berkus <josh(at)agliodbs(dot)com> wrote:

> On 10/01/2015 07:43 AM, Robert Haas wrote:
> > On Thu, Oct 1, 2015 at 9:44 AM, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
> wrote:
> >> I wonder how much it's worth renaming only the file extension while
> >> there are many places where "visibility map" and "vm" are used,
> >> for example, log messages, function names, variables, etc.
> >
> > I'd be inclined to keep calling it the visibility map (vm) even if it
> > also contains freeze information.
> >
>
> -1 to rename. Visibility Map is a perfectly good name.

The name can stay the same, but specifically the file extension should
change.

This patch changes the layout of existing information:
* _vm stores one bit per page
* _$new stores two bits per page

The problem is we won't be able to tell the two formats apart, since they
both are just lots of bits. So we won't be able to tell if the file is old
format or new format, which could lead to loss of information that relates
to visibility. If we think something is all-visible when it is not, this is
effectively data corruption.

In light of lessons learned from multixactids, I think its important that
we are able to tell the difference between an old format and a new format
visibility map.

My suggestion to do so was to call it "vfm", so we indicate that it is now
a Visibility & Freeze Map

I don't care if we change the name, but I do care if we can't tell the
difference between a failed upgrade, a normal upgrade and a server that has
been upgraded multiple times. Alternate suggestions welcome.

--
Simon Riggs http://www.2ndQuadrant.com/
<http://www.2ndquadrant.com/>
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2015-10-08 17:52:40 Re: Freeze avoidance of very large table.
Previous Message Robert Haas 2015-10-08 17:27:19 Re: [PATCH] Documentation bug in 9.5/ master - pg_replication_origin_session_setup