Re: foreign key locks, 2nd attempt

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Simon Riggs <simon(at)2ndquadrant(dot)com>, Noah Misch <noah(at)leadboat(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: foreign key locks, 2nd attempt
Date: 2012-03-16 00:53:05
Message-ID: 1331859074-sup-6025@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Excerpts from Robert Haas's message of jue mar 15 21:37:36 -0300 2012:
>
> On Thu, Mar 15, 2012 at 5:07 PM, Simon Riggs <simon(at)2ndquadrant(dot)com> wrote:
> > On Wed, Mar 14, 2012 at 5:23 PM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> >>> You still have HEAP_XMAX_{INVALID,COMMITTED} to reduce the pressure on mxid
> >>> lookups, so I think something more sophisticated is needed to exercise that
> >>> cost.  Not sure what.
> >>
> >> I don't think HEAP_XMAX_COMMITTED is much help, because committed !=
> >> all-visible.
> >
> > So because committed does not equal all visible there will be
> > additional lookups on mxids? That's complete rubbish.
>
> Noah seemed to be implying that once the updating transaction
> committed, HEAP_XMAX_COMMITTED would get set and save the mxid lookup.
> But I think that's not true, because anyone who looks at the tuple
> afterward will still need to know the exact xmax, to test it against
> their snapshot.

Yeah, we don't set HEAP_XMAX_COMMITTED on multis, even when there's an
update in it and it committed. I think we could handle it, at least
some of the cases, but that'd require careful re-examination of all the
tqual.c code, which is not something I want to do right now.

--
Álvaro Herrera <alvherre(at)commandprompt(dot)com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2012-03-16 01:38:20 Re: Keystone auth in PostgreSQL
Previous Message Robert Haas 2012-03-16 00:37:36 Re: foreign key locks, 2nd attempt