Repeated PredicateLockRelation calls during seqscan - Mailing list pgsql-hackers

From Dan Ports
Subject Repeated PredicateLockRelation calls during seqscan
Date
Msg-id 20110622045850.GN83336@csail.mit.edu
Whole thread Raw
Responses Re: Repeated PredicateLockRelation calls during seqscan
Re: Repeated PredicateLockRelation calls during seqscan
List pgsql-hackers
I was looking at ExecSeqScan today and noticed that it invokes
PredicateLockRelation each time it's called, i.e. for each tuple
returned. Any reason we shouldn't skip that call if
rs_relpredicatelocked is already set, as in the attached patch?

That would save us a bit of overhead, since checking that flag is
cheaper than doing a hash lookup in the local predicate lock table
before bailing out.

Dan

--
Dan R. K. Ports              MIT CSAIL                http://drkp.net/

Attachment

pgsql-hackers by date:

Previous
From: Brendan Jurd
Date:
Subject: Re: Fwd: Keywords in pg_hba.conf should be field-specific
Next
From: Dan Ports
Date:
Subject: Re: pika buildfarm member failure on isolationCheck tests