crash-safe visibility map, take five

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: crash-safe visibility map, take five
Date: 2011-05-06 21:47:23
Message-ID: BANLkTimuLk4RHXSQHEEiYGbxiXp2mh5KCA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Mar 30, 2011 at 8:52 AM, Heikki Linnakangas
<heikki(dot)linnakangas(at)enterprisedb(dot)com> wrote:
>> Another question:
>> To address the problem in
>> http://archives.postgresql.org/pgsql-hackers/2010-02/msg02097.php
>> , should we just clear the vm before the log of insert/update/delete?
>> This may reduce the performance, is there another solution?
>
> Yeah, that's a straightforward way to fix it. I don't think the performance
> hit will be too bad. But we need to be careful not to hold locks while doing
> I/O, which might require some rearrangement of the code. We might want to do
> a similar dance that we do in vacuum, and call visibilitymap_pin first, then
> lock and update the heap page, and then set the VM bit while holding the
> lock on the heap page.

Here's an attempt at implementing the necessary gymnastics.

Comments?

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

Attachment Content-Type Size
visibility-map-v2.patch application/octet-stream 28.8 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2011-05-06 21:52:33 Re: Why not install pgstattuple by default?
Previous Message Alvaro Herrera 2011-05-06 21:38:12 Re: Prefered Types