Re: POC: Lock updated tuples in tuple_update() and tuple_delete() - Mailing list pgsql-hackers

From Aleksander Alekseev
Subject Re: POC: Lock updated tuples in tuple_update() and tuple_delete()
Date
Msg-id CAJ7c6TN=kp5Q5aAJfSiWRLLKk04J3yTyh=ckMTecEynvR2u_dA@mail.gmail.com
Whole thread Raw
In response to Re: POC: Lock updated tuples in tuple_update() and tuple_delete()  (Aleksander Alekseev <aleksander@timescale.com>)
Responses Re: POC: Lock updated tuples in tuple_update() and tuple_delete()
List 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



pgsql-hackers by date:

Previous
From: Aleksander Alekseev
Date:
Subject: Re: POC: Lock updated tuples in tuple_update() and tuple_delete()
Next
From: Melih Mutlu
Date:
Subject: [PATCH] Reuse Workers and Replication Slots during Logical Replication