On Tue, Oct 11, 2016 at 4:57 AM, Dilip Kumar <dilipbal...@gmail.com> wrote:
> This patch will extract the expression from qual and prepare the scan
> keys. Currently in POC version I have only supported "var OP const"
> type of qual, because these type of quals can be pushed down using
> existing framework.
> Purpose of this work is to first implement the basic functionality and
> analyze the results. If results are good then we can extend it for
> other type of expressions.
> However in future when we try to expand the support for complex
> expressions, then we need to be very careful while selecting
> pushable expression. It should not happen that we push something very
> complex, which may cause contention with other write operation (as
> HeapKeyTest is done under page lock).
I seriously doubt that this should EVER be supported for anything
other than "var op const", and even then only for very simple
operators. For example, texteq() is probably too complicated, because
it might de-TOAST, and that might involve doing a LOT of work while
holding the buffer content lock. But int4eq() would be OK.
Part of the trick if we want to make this work is going to be figuring
out how we'll identify which operators are safe.
The Enterprise PostgreSQL Company
Sent via pgsql-hackers mailing list (email@example.com)
To make changes to your subscription: