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

Re: crash-safe visibility map, take three

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: crash-safe visibility map, take three
Date: 2010-12-01 16:48:03
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> writes:
> On 01.12.2010 18:40, Tom Lane wrote:
>> Um, no it isn't.  Suppose the heap page gets to disk but we crash before
>> the WAL record does.  Now we have a persistent state where the heap page
>> is marked PD_ALL_VISIBLE but the corresponding VM bit is not set.  The
>> VM bit will never become set, either, because operations on the heap
>> page will see PD_ALL_VISIBLE and assume it already is set.  This state
>> of affairs might be acceptable from a correctness standpoint, but not
>> from a performance standpoint.

> The next vacuum will fix it. We already handle that. It's no different 
> from the situation where neither change makes it to the disk.

Well, as long as we're careful not to optimize away setting the VM bit
on the grounds that PD_ALL_VISIBLE is already set, I suppose that will

			regards, tom lane

In response to

pgsql-hackers by date

Next:From: Florian PflugDate: 2010-12-01 17:09:15
Subject: Re: improving foreign key locks
Previous:From: Heikki LinnakangasDate: 2010-12-01 16:44:12
Subject: Re: crash-safe visibility map, take three

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