Re: Repeated PredicateLockRelation calls during seqscan
От | Heikki Linnakangas |
---|---|
Тема | Re: Repeated PredicateLockRelation calls during seqscan |
Дата | |
Msg-id | 4E023240.6070100@enterprisedb.com обсуждение исходный текст |
Ответ на | Re: Repeated PredicateLockRelation calls during seqscan (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: Repeated PredicateLockRelation calls during
seqscan
|
Список | pgsql-hackers |
On 22.06.2011 17:28, Tom Lane wrote: > Dan Ports<drkp@csail.mit.edu> writes: >> 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? > > Why is the call in ExecSeqScan at all, and not in the node startup > function? It makes sense to delay it until the scan is actually started, so that you don't get unnecessary serialization failures if the scan is never actually executed. I don't know if that was Kevin's original reason for putting it there, but that's why I left it there. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com
В списке pgsql-hackers по дате отправления: