Re: Handling GIN incomplete splits - Mailing list pgsql-hackers

From Jeff Janes
Subject Re: Handling GIN incomplete splits
Date
Msg-id CAMkU=1yBi=5d1jCgR_MzoOxMZo7xQZrDw7XN9H-+VmCFSDsM6A@mail.gmail.com
Whole thread Raw
In response to Handling GIN incomplete splits  (Heikki Linnakangas <hlinnakangas@vmware.com>)
Responses Re: Handling GIN incomplete splits  (Jeff Janes <jeff.janes@gmail.com>)
List pgsql-hackers
On Wed, Nov 13, 2013 at 8:49 AM, Heikki Linnakangas <hlinnakangas@vmware.com> wrote:
Here's another part of my crusade against xlog cleanup routines. This series of patches gets rid of the gin_cleanup() function, which is currently used to finish splits of GIN b-tree pages, if the system crashes (or an error occurs) between splitting a page and inserting its downlink to the parent.

The first three patches just move code around. IMHO they make the code more readable, so they should be committed in any case. The meat is in the fourth patch.

Thoughts, objections?

Alexander, I'm sorry if this conflicts with your GIN patches. Feel free to post the latest versions of your patches against the current master, ignoring patches. I can fix the bitrot. That said, I think these refactorings will make your code look a little bit nicer too, so you might want to rebase because of that anyway.

Hi Heikki,

The commit 04eee1fa9ee80dabf7 of this series causes a self-deadlock in the LWLock code during the operation below, with it trying to take an LW_EXCLUSIVE on a high, even-numbered lockid when it already holds the same lockid.

CREATE INDEX planet_osm_ways_nodes ON planet_osm_ways USING gin (nodes)  WITH (FASTUPDATE=OFF);

It happens pretty reliably using osm2pgsql.

I will try to come up with a simple reproducible demonstration, and stack trace, over the weekend.

Cheers,

Jeff

pgsql-hackers by date:

Previous
From: Atri Sharma
Date:
Subject: Re: Status of FDW pushdowns
Next
From: Heikki Linnakangas
Date:
Subject: Re: Handling GIN incomplete splits