pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@anarazel.de>
To: pgsql-committers@lists.postgresql.org,Alexander Korotkov <a.korotkov@postgrespro.ru>
Cc: pgsql-committers <pgsql-committers@lists.postgresql.org>
Subject: Re: pgsql: tableam: Add tuple_{insert, delete, update, lock} and use.
Date: Sun, 24 Mar 2019 11:22:47 -0700
Message-ID: <FBF80559-A61A-4081-9B24-08FB2009E3C3@anarazel.de> (raw)
In-Reply-To: <CAPpHfdsEi8DuUyy=aC=CenmD0H1Azx_vvytDzNQU6XHOWthM3A@mail.gmail.com>
References: <E1h7tOK-0007im-Si@gemulon.postgresql.org>
	<CAPpHfdsEi8DuUyy=aC=CenmD0H1Azx_vvytDzNQU6XHOWthM3A@mail.gmail.com>

Hi,

On March 24, 2019 11:17:15 AM PDT, Alexander Korotkov <a.korotkov@postgrespro.ru> wrote:
>Great work, thank you very much!
>
>On Sun, Mar 24, 2019 at 6:02 AM Andres Freund <andres@anarazel.de>
>wrote:
>> Previously both delete/update/lock call-sites and the EPQ mechanism
>had
>> to have awareness of the specific tuple format to be able to fetch
>the
>> latest version of a tuple. Obviously that needs to be abstracted
>> away. To do so, move the logic that find the latest row version into
>> the AM. lock_tuple has a new flag argument,
>> TUPLE_LOCK_FLAG_FIND_LAST_VERSION, that forces it to lock the last
>> version, rather than the current one.  It'd have been possible to do
>> so via a separate callback as well, but finding the last version
>> usually also necessitates locking the newest version, making it
>> sensible to combine the two. This replaces the previous use of
>> EvalPlanQualFetch().  Additionally HeapTupleUpdated, which previously
>> signaled either a concurrent update or delete, is now split into two,
>> to avoid callers needing AM specific knowledge to differentiate.
>
>BTW, given your skepticism during PGCon 2018 discussions, I didn't
>expect my lock tuple patch [1] to get in. 

Well, nobody came up with a better design, and after polishing it didn't look that bad...


>  But if it finally got in,
>I've expected to be listed as author...
>
>1.
>https://www.postgresql.org/message-id/CAJrrPGc951F-R4Kfa4W47B5vHKeHsB2Y34zewp%3Db%2BAWSkF9RVA%40mail...

Sorry, I wasn't aware of the origin of they piece of work.

Andres
-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.




view thread (3+ messages)

Message-ID: <FBF80559-A61A-4081-9B24-08FB2009E3C3@anarazel.de>
Permalink:  ../FBF80559-A61A-4081-9B24-08FB2009E3C3@anarazel.de/
Also on:    postgresql.org/message-id/FBF80559-A61A-4081-9B24-08FB2009E3C3@anarazel.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: andres@anarazel.de, a.korotkov@postgrespro.ru
  Subject: Re: pgsql: tableam: Add tuple_{insert, delete, update, lock} and use.
  In-Reply-To: <FBF80559-A61A-4081-9B24-08FB2009E3C3@anarazel.de>
  References: <E1h7tOK-0007im-Si@gemulon.postgresql.org> <CAPpHfdsEi8DuUyy=aC=CenmD0H1Azx_vvytDzNQU6XHOWthM3A@mail.gmail.com> <FBF80559-A61A-4081-9B24-08FB2009E3C3@anarazel.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox