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: | 17653.1291222083@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
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
work.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Florian Pflug | 2010-12-01 17:09:15 | Re: improving foreign key locks |
Previous Message | Heikki Linnakangas | 2010-12-01 16:44:12 | Re: crash-safe visibility map, take three |