Re: [HACKERS] clog double-dip in heap_hot_search_buffer

2012-05-02 Thread Robert Haas
On Wed, May 2, 2012 at 12:19 PM, Tom Lane wrote: > Robert Haas writes: >> On Wed, May 2, 2012 at 12:06 PM, Tom Lane wrote: >>> Otherwise this seems like a good idea. > >> Do you think I should apply this to 9.2, or wait until 9.3? > > We're not at beta yet, and it seems pretty safe/self-containe

Re: [HACKERS] clog double-dip in heap_hot_search_buffer

2012-05-02 Thread Tom Lane
Robert Haas writes: > On Wed, May 2, 2012 at 12:06 PM, Tom Lane wrote: >> Otherwise this seems like a good idea. > Do you think I should apply this to 9.2, or wait until 9.3? We're not at beta yet, and it seems pretty safe/self-contained, so I have no objection to committing now.

Re: [HACKERS] clog double-dip in heap_hot_search_buffer

2012-05-02 Thread Simon Riggs
On Wed, May 2, 2012 at 5:07 PM, Robert Haas wrote: > On Wed, May 2, 2012 at 12:06 PM, Tom Lane wrote: >> Robert Haas writes: >>> +     /* Deleter committed, so tuple is alive if the XID is old enough. */ >>> +     return TransactionIdPrecedes(HeapTupleHeaderGetXmax(tuple), >>> OldestXmin); >> >

Re: [HACKERS] clog double-dip in heap_hot_search_buffer

2012-05-02 Thread Robert Haas
On Wed, May 2, 2012 at 12:06 PM, Tom Lane wrote: > Robert Haas writes: >> +     /* Deleter committed, so tuple is alive if the XID is old enough. */ >> +     return TransactionIdPrecedes(HeapTupleHeaderGetXmax(tuple), >> OldestXmin); > > s/alive/dead/ in that comment? Yep, good catch, thanks.

Re: [HACKERS] clog double-dip in heap_hot_search_buffer

2012-05-02 Thread Tom Lane
Robert Haas writes: > + /* Deleter committed, so tuple is alive if the XID is old enough. */ > + return TransactionIdPrecedes(HeapTupleHeaderGetXmax(tuple), OldestXmin); s/alive/dead/ in that comment? Otherwise this seems like a good idea. regards, tom lane --

[HACKERS] clog double-dip in heap_hot_search_buffer

2012-05-02 Thread Robert Haas
heap_hot_search_buffer() does this: valid = HeapTupleSatisfiesVisibility(heapTuple, snapshot, buffer); If it turns out that the tuple isn't valid (i.e. visible to our scan) and we haven't yet found any live tuples in the current HOT chain, then we check whether it's visible to anyone