From: | Heikki Linnakangas <hlinnakangas(at)vmware(dot)com> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Noah Misch <noah(at)leadboat(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Torn page hazard in ginRedoUpdateMetapage() |
Date: | 2014-03-12 08:23:40 |
Message-ID: | 5320198C.2090207@vmware.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 03/10/2014 09:44 PM, Robert Haas wrote:
> On Mon, Apr 30, 2012 at 1:34 PM, Noah Misch <noah(at)leadboat(dot)com> wrote:
>> When GIN changes a metapage, we WAL-log its ex-header content and never use a
>> backup block. This reduces WAL volume since the vast majority of the metapage
>> is unused. However, ginRedoUpdateMetapage() only restores the WAL-logged
>> content if the metapage LSN predates the WAL record LSN. If a metapage write
>> tore and updated the LSN but not the other content, we would fail to complete
>> the update. Instead, unconditionally reinitialize the metapage similar to how
>> _bt_restore_meta() handles the situation.
>>
>> I found this problem by code reading and did not attempt to build a test case
>> illustrating its practical consequences. It's possible that there's no
>> problem in practice on account of some reason I haven't contemplated.
>
> The attached patch doesn't apply any more, but it looks like this
> issue still exists.
Fixed.
- Heikki
From | Date | Subject | |
---|---|---|---|
Next Message | Julien Tachoires | 2014-03-12 08:55:34 | Rowtype column and domain subfield with DEFAULT and NOT NULL constraint |
Previous Message | Albe Laurenz | 2014-03-12 08:19:41 | Re: The case against multixact GUCs |