Re: Moving ExecInsertIndexTuples and friends to new file

From: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
To: Stephen Frost <sfrost(at)snowman(dot)net>, Peter Geoghegan <pg(at)heroku(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Moving ExecInsertIndexTuples and friends to new file
Date: 2015-04-24 13:38:34
Message-ID: 553A475A.3020103@iki.fi
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 04/24/2015 09:36 AM, Heikki Linnakangas wrote:
> On 04/24/2015 06:30 AM, Stephen Frost wrote:
>> * Peter Geoghegan (pg(at)heroku(dot)com) wrote:
>>> On Thu, Apr 23, 2015 at 12:05 PM, Heikki Linnakangas <hlinnaka(at)iki(dot)fi> wrote:
>>>> While looking at Peter's INSERT ... ON CONFLICT patch, I started to feel
>>>> that ExecInsertIndexTuples() and friends would deserve a file of their own,
>>>> and not be buried in the middle of execUtils.c. I propose that we split
>>>> execUtils.c into two, moving ExecOpenIndices(), ExecCloseIndices()
>>>> ExecInsertIndexTuples() and related functions into a new file called
>>>> executor/execIndexing.c.
>>>
>>> That split makes a lot of sense to me.
>>
>> No objections here.
>
> Ok, moved.

I wrote a little overview text on how unique and exclusion constraints
are enforced. Most of the information can be gleaned from comments
elsewhere, but I think it's helpful to have it in one place. Makes it
easier to compare how unique and exclusion constraints work. The
harmless deadlocks with exclusion constraints are not explained
elsewhere AFAICS.

This is also in preparation for Peter's INSERT ON CONFLICT patch. That
will add another section explaining how the deadlocks and livelocks are
avoided. That's easier to understand after you grok the potential for
deadlocks with exclusion constraints.

This also removes a comment from 1989 claiming that the code should be
moved elsewhere. I think the code is in the right place.

- Heikki

Attachment Content-Type Size
how-unique-and-exclusion-constraints-are-enforced.patch application/x-patch 3.7 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Joel Jacobson 2015-04-24 14:02:18 Re: PL/pgSQL, RAISE and error context
Previous Message Stephen Frost 2015-04-24 13:23:17 Re: Fwd: [GENERAL] 4B row limit for CLOB tables