Re: Race condition in b-tree page deletion

From: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
To: Kevin Grittner <kgrittn(at)ymail(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Race condition in b-tree page deletion
Date: 2014-01-28 11:13:43
Message-ID: 52E790E7.60400@vmware.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 01/27/2014 04:34 PM, Heikki Linnakangas wrote:
> While fixing the above issues, and reviewing this again in general, I
> noticed that btree_xlog_unlink_page() was a few bricks shy of a load.
> When unlinking an internal page, it didn't update the pointer to the new
> topmost page in the to-be-deleted chain. Fixed that.
>
> Attached is a new version. I also re-worded the README changes; I hope
> it reads better now.

I dusted off the scripts I posted yesterday, to visualize b-tree
structure using graphviz, and tried it on this patch. I found a number
of bugs. Attached is a new version with those bugs fixed.

- Heikki

Attachment Content-Type Size
fix-btree-page-deletion-4.patch text/x-diff 64.5 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2014-01-28 11:28:35 Re: Observed Compilation warning in WIN32 build
Previous Message Kyotaro HORIGUCHI 2014-01-28 11:12:37 Re: Retain dynamic shared memory segments for postmaster lifetime