Re: [COMMITTERS] pgsql: Make the visibility map crash-safe.

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [COMMITTERS] pgsql: Make the visibility map crash-safe.
Date: 2011-06-27 18:02:20
Message-ID: BANLkTimX2BwkTKbvOOVyaZXsAJEenajm_Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On Thu, Jun 23, 2011 at 9:22 AM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> On Wed, Jun 22, 2011 at 10:23 PM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>> Well, it seems I didn't put nearly enough thought into heap_update().
>> The fix for the immediate problem looks simple enough - all the code
>> has been refactored to use the new API, so the calls can be easily be
>> moved into the critical section (see attached).  But looking at this a
>> little more, I see that heap_update() is many bricks short of a load,
>> because there are several places where the buffer can be unlocked and
>> relocked, and we don't recheck whether the page is all-visible after
>> reacquiring the lock.  So I've got some more work to do here.
>
> See what you think of the attached.  I *think* this covers all bases.
> It's a little more complicated than I would like, but I don't think
> fatally so.

For lack of comment, committed. It's hopefully at least better than
what was there before, which was clearly several bricks short of a
load.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2011-06-27 19:26:02 pgsql: Allow callers to pass a missing_ok flag when opening a relation.
Previous Message Robert Haas 2011-06-27 18:01:47 pgsql: Try again to make the visibility map crash safe.

Browse pgsql-hackers by date

  From Date Subject
Next Message Kevin Grittner 2011-06-27 18:03:17 Re: generate_series() Interpretation
Previous Message Bruce Momjian 2011-06-27 17:59:07 Re: pg_upgrade defaulting to port 25432