Re: Visibility bug in tuple lock - Mailing list pgsql-hackers

From Jasper Smit
Subject Re: Visibility bug in tuple lock
Date
Msg-id CAOG+RQ7Lv36iqSi2d5ZHe9GAdMj99Ap8b4g-qacfh+CPVRRarQ@mail.gmail.com
Whole thread Raw
In response to Re: Visibility bug in tuple lock  (Heikki Linnakangas <hlinnaka@iki.fi>)
List pgsql-hackers
The test is really nice with the injection points and the dynamically
sized data.

> Ah, but this codepath is taken when HEAP_KEYS_UPDATED is *not* set. I
> got that backwards. So I agree the ItemPointerEquals(&tuple->t_self,
> ctid) check is redundant.

Ok, I did not think about deletes. So the boolean updated here could
mean both update and delete, that makes sense to me.

> I chatted about that with Andres Freund just the other day, and he said
> that compilers are not good at optimizing passing them by value. I'll
> take his word on that.

I believe that too, but in heap_lock_updated_tuple_rec() the first
thing we do is ItemPointerCopy(tid, &tupid); , which makes it probably
just as inefficient.

Jasper



pgsql-hackers by date:

Previous
From: Alexander Pyhalov
Date:
Subject: Re: Asynchronous MergeAppend
Next
From: John Naylor
Date:
Subject: Re: [PATCH] Documentation