Re: Repeated PredicateLockRelation calls during seqscan

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Dan Ports <drkp(at)csail(dot)mit(dot)edu>
Cc: pgsql-hackers(at)postgresql(dot)org, Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>
Subject: Re: Repeated PredicateLockRelation calls during seqscan
Date: 2011-06-22 14:28:19
Message-ID: 29470.1308752899@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Dan Ports <drkp(at)csail(dot)mit(dot)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?

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2011-06-22 15:25:43 Re: pg_dump vs malloc
Previous Message Tom Lane 2011-06-22 14:17:09 Re: [v9.2] DROP Reworks Part.0 - 'missing_ok' support of get_object_address