From: Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Dan Ports <drkp@csail.mit.edu>
Cc: pgsql-hackers@postgresql.org, Kevin Grittner <Kevin.Grittner@wicourts.gov>
Subject: Re: Repeated PredicateLockRelation calls during seqscan
Date: Wed, 22 Jun 2011 21:19:44 +0300
Message-ID: <4E023240.6070100@enterprisedb.com> (raw)
In-Reply-To: <29470.1308752899@sss.pgh.pa.us>
References: <20110622045850.GN83336@csail.mit.edu>
<29470.1308752899@sss.pgh.pa.us>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: heikki.linnakangas@enterprisedb.com, tgl@sss.pgh.pa.us, drkp@csail.mit.edu, Kevin.Grittner@wicourts.gov
Subject: Re: Repeated PredicateLockRelation calls during seqscan
In-Reply-To: <4E023240.6070100@enterprisedb.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox