Skip site navigation (1) Skip section navigation (2)

Re: 16-bit page checksums for 9.2

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: Simon Riggs <simon(at)2ndquadrant(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Noah Misch <noah(at)leadboat(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Kevin Grittner <kevin(dot)grittner(at)wicourts(dot)gov>, david <david(at)fetter(dot)org>, aidan <aidan(at)highrise(dot)ca>, stark <stark(at)mit(dot)edu>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: 16-bit page checksums for 9.2
Date: 2012-02-29 20:14:14
Message-ID: 1330544280-sup-4569@alvh.no-ip.org (view raw or flat)
Thread:
Lists: pgsql-hackers
Excerpts from Heikki Linnakangas's message of mié feb 29 16:29:26 -0300 2012:
> On 29.02.2012 21:18, Alvaro Herrera wrote:
> > Excerpts from Heikki Linnakangas's message of mié feb 29 16:09:02 -0300 2012:
> >> I thought my view on how this should be done was already clear, but just
> >> in case it isn't, let me restate: Enlarge the page header to make room
> >> for the checksum. To handle upgrades, put code in the backend to change
> >> the page format from old version to new one on-the-fly, as pages are
> >> read in. Because we're making the header larger, we need to ensure that
> >> there's room on every page. To do that, write a utility that you run on
> >> the cluster before running pg_upgrade, which moves tuples to ensure
> >> that. To ensure that the space doesn't get used again before upgrading,
> >> change the old version so that it reserves those N bytes in all new
> >> insertions and updates (I believe that approach has been discussed
> >> before and everyone is comfortable with backpatching such a change). All
> >> of this in 9.3.
> >
> > Note that if we want such an utility to walk and transform pages, we
> > probably need a marker in the catalogs somewhere so that pg_upgrade can
> > make sure that it was done in all candidate tables -- which is something
> > that we should get in 9.2 so that it can be used in 9.3.
> 
> In the simplest form, the utility could just create a magic file in the 
> data directory to indicate that it has run. All we need is a boolean 
> flag, unless you want to be fancy and make the utility restartable. 
> Implemented that way, there's no need to have anything in the catalogs.

Well, I find it likely that people with huge and/or high velocity
databases would want to get fancy about it, so that they can schedule it
as they see fit.

What I wouldn't like is an utility that is optional, so that we end up
with situations after upgrade that do have the new page format, others
that don't.

-- 
Álvaro Herrera <alvherre(at)commandprompt(dot)com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

pgsql-hackers by date

Next:From: Pavel StehuleDate: 2012-02-29 20:25:30
Subject: Re: review: CHECK FUNCTION statement
Previous:From: Andrew DunstanDate: 2012-02-29 20:08:06
Subject: Re: "make check" in src/test/isolation is unworkable

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group