Re: Remove HeapTuple and Buffer dependency for predicate locking functions

From: Ashwin Agrawal <aagrawal(at)pivotal(dot)io>
To: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
Cc: Andres Freund <andres(at)anarazel(dot)de>, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>, Kuntal Ghosh <kuntalghosh(dot)2007(at)gmail(dot)com>
Subject: Re: Remove HeapTuple and Buffer dependency for predicate locking functions
Date: 2019-07-31 17:42:50
Message-ID: CALfoeivEH50tf0pC-eM=rOtrF8ibO=bke42-AN6UB_0BDVQh8Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jul 30, 2019 at 2:58 PM Thomas Munro <thomas(dot)munro(at)gmail(dot)com> wrote:

> On Tue, Jun 25, 2019 at 6:02 AM Andres Freund <andres(at)anarazel(dot)de> wrote:
> > > - CheckForSerializableConflictOut() no more takes HeapTuple nor
> > > buffer, instead just takes xid. Push heap specific parts from
> > > CheckForSerializableConflictOut() into its own function
> > > HeapCheckForSerializableConflictOut() which calls
> > > CheckForSerializableConflictOut(). The alternative option could be
> > > CheckForSerializableConflictOut() take callback function and
> > > callback arguments, which gets called if required after performing
> > > prechecks. Though currently I fell AM having its own wrapper to
> > > perform AM specific task and then calling
> > > CheckForSerializableConflictOut() is fine.
> >
> > I think it's right to move the xid handling out of
> > CheckForSerializableConflictOut(). But I think we also ought to move the
> > subtransaction handling out of the function - e.g. zheap doesn't
> > want/need that.
>
> Thoughts on this Ashwin?
>

I think the only part its doing for sub-transaction is
SubTransGetTopmostTransaction(xid). If xid passed to this function is
already top most transaction which is case for zheap and zedstore, then
there is no downside to keeping that code here in common place.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2019-07-31 17:49:08 Re: Patch for SortSupport implementation on inet/cdir
Previous Message Heikki Linnakangas 2019-07-31 17:20:57 Re: Assertion for logically decoding multi inserts into the catalog