Re: Re: Buffer access rules, and a probable bug - Mailing list pgsql-hackers

From Hiroshi Inoue
Subject Re: Re: Buffer access rules, and a probable bug
Date
Msg-id 3B43AA1C.F0A62AA1@tpf.co.jp
Whole thread Raw
In response to RE: Re: Buffer access rules, and a probable bug  ("Hiroshi Inoue" <Inoue@tpf.co.jp>)
Responses Re: Re: Buffer access rules, and a probable bug
Re: Re: Buffer access rules, and a probable bug
List pgsql-hackers
Tom Lane wrote:
> 
> "Hiroshi Inoue" <Inoue@tpf.co.jp> writes:
> > As for HeapTupleSatisfies() there seems to be another choise to
> > let HeapTupleSatisfiesAny() be equivalent to HeapTupleSatisfiesNow()
> > other than always returning true.
> 
> Wouldn't that break the other uses of SnapshotAny? 

In theory no because HeapTupleSatisfies...() only touches
hint bits. What I mean is to implement a new function
HeapTupleSatisfiesAny() as

bool
HeapTupleSatisfiesAny(HeapTupleHeader tuple)
{HeapTupleSatisfiesNow(tuple);return true;
}
.

> I'm not sure
> it's what nbtree.c wants, either, because then the heap_getnext
> call wouldn't return recently-dead tuples at all.
> 

nbtree.c has to see all(including dead) tuples and judge
if the tuples are alive, dead or removable via unified
time qualification.

regards,
Hiroshi Inoue


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: CREATE TABLE .. PRIMARY KEY quirk
Next
From: Tom Lane
Date:
Subject: Re: Re: Buffer access rules, and a probable bug