Re: POC: Lock updated tuples in tuple_update() and tuple_delete()

From: Aleksander Alekseev <aleksander(at)timescale(dot)com>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Cc: Alexander Korotkov <aekorotkov(at)gmail(dot)com>
Subject: Re: POC: Lock updated tuples in tuple_update() and tuple_delete()
Date: 2022-07-05 13:41:27
Message-ID: CAJ7c6TN=kp5Q5aAJfSiWRLLKk04J3yTyh=ckMTecEynvR2u_dA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi again,

> + if (!updated)
> + {
> + /* Should not encounter speculative tuple on recheck */
> + Assert(!HeapTupleHeaderIsSpeculative(tuple->t_data));
> - ReleaseBuffer(buffer);
> + ReleaseBuffer(buffer);
> + }
> + else
> + {
> + updated = false;
> + }

OK, I got confused here. I suggest changing the if(!...) { .. } else {
.. } code to if() { .. } else { .. } here.

--
Best regards,
Aleksander Alekseev

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Melih Mutlu 2022-07-05 13:50:20 [PATCH] Reuse Workers and Replication Slots during Logical Replication
Previous Message Aleksander Alekseev 2022-07-05 13:38:28 Re: POC: Lock updated tuples in tuple_update() and tuple_delete()