Re: SSI heap_insert and page-level predicate locks

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jeff Davis <pgsql(at)j-davis(dot)com>
Cc: Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>, Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, Dan Ports <drkp(at)csail(dot)mit(dot)edu>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: SSI heap_insert and page-level predicate locks
Date: 2011-09-16 18:51:11
Message-ID: 7826.1316199071@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Jeff Davis <pgsql(at)j-davis(dot)com> writes:
> On Wed, 2011-06-08 at 17:29 -0500, Kevin Grittner wrote:
>> Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> wrote:
>>> AFAICS, the check for page lock is actually unnecessary.

>> Absolutely correct. Patch attached.

> I like the change, but the comment is slightly confusing.

I've committed this patch with comment rewording along the lines
suggested by Jeff. I also moved the CheckForSerializableConflictIn call
to just before, instead of just after, the RelationGetBufferForTuple
call. We no longer have to do it after, since we don't need to know
which buffer to pass, and it should buy some more low-level parallelism
to run the SSI checks while not holding exclusive lock on the eventual
target buffer.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Joshua Berkus 2011-09-16 19:22:53 Re: unite recovery.conf and postgresql.conf
Previous Message Alex Hunsaker 2011-09-16 18:13:32 Re: /proc/self/oom_adj is deprecated in newer Linux kernels