Re: foreign key locks, 2nd attempt

Noah Misch <noah@leadboat.com>

From: Noah Misch <noah@leadboat.com>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Simon Riggs <simon@2ndquadrant.com>, Alvaro Herrera <alvherre@commandprompt.com>, Tom Lane <tgl@sss.pgh.pa.us>, Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2012-03-16T01:52:12Z
Lists: pgsql-hackers

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Try to avoid running with a full fsync request queue.

On Thu, Mar 15, 2012 at 08:37:36PM -0400, Robert Haas wrote:
> On Thu, Mar 15, 2012 at 5:07 PM, Simon Riggs <simon@2ndquadrant.com> wrote:
> > On Wed, Mar 14, 2012 at 5:23 PM, Robert Haas <robertmhaas@gmail.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, my comment above was wrong.  I agree that we'll need to retrieve the
mxid members during every MVCC scan until we either mark the page all-visible
or have occasion to simplify the mxid xmax to the updater xid.