pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alexander Korotkov <akorotkov@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Evade extra table_tuple_fetch_row_version() in ExecUpdate()/Exec
Date: Wed, 22 Mar 2023 21:27:25 +0000
Message-ID: <E1pf5zQ-004tAj-Sp@gemulon.postgresql.org> (raw)

Evade extra table_tuple_fetch_row_version() in ExecUpdate()/ExecDelete()

When we lock tuple using table_tuple_lock() then we at the same time fetch
the locked tuple to the slot.  In this case we can skip extra
table_tuple_fetch_row_version() thank to we've already fetched the 'old' tuple
and nobody can change it concurrently since it's locked.

Discussion: https://postgr.es/m/CAPpHfdua-YFw3XTprfutzGp28xXLigFtzNbuFY8yPhqeq6X5kg%40mail.gmail.com
Reviewed-by: Aleksander Alekseev, Pavel Borisov, Vignesh C, Mason Sharp
Reviewed-by: Andres Freund, Chris Travers

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/764da7710bf68eebb2c0facb2f871bc3c7a705b6

Modified Files
--------------
src/backend/executor/nodeModifyTable.c | 48 +++++++++++++++++++++++++---------
1 file changed, 35 insertions(+), 13 deletions(-)



Message-ID: <E1pf5zQ-004tAj-Sp@gemulon.postgresql.org>
Permalink:  ../E1pf5zQ-004tAj-Sp@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1pf5zQ-004tAj-Sp@gemulon.postgresql.org

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: akorotkov@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Evade extra table_tuple_fetch_row_version() in ExecUpdate()/Exec
  In-Reply-To: <E1pf5zQ-004tAj-Sp@gemulon.postgresql.org>

* 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