Re: Subplan result caching - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Subplan result caching
Date
Msg-id CA+TgmoZYefMioZWaicAderT=XUqmP3B6aZE9r9PRa8axhFQaHw@mail.gmail.com
Whole thread Raw
In response to Re: Subplan result caching  (David Rowley <david.rowley@2ndquadrant.com>)
Responses Re: Subplan result caching
List pgsql-hackers
On Mon, Jul 9, 2018 at 5:08 AM, David Rowley
<david.rowley@2ndquadrant.com> wrote:
> From looking at the code I see that the caching is being done inside
> nodeSubplan.c. I don't think this is the right approach to the
> problem. The problem exists for any parameterized path, so I think a
> more general approach would be much better.

Yeah, perhaps, though sometimes a more specific problem is easier to solve.

> "LazyMaterialize" seems like a good option for a name. It seems better
> than "LazyHash" since you may not want to restrict it to a hash table
> based cache in the future.  A binary search tree may be a good option
> for types that cannot be hashed.

I think that's not too clear, actually.  The difference between a
Materialize and a LazyMaterialize is not that this is lazy and that's
not.  It's that this can cache multiple result sets for various
parameter values and that can only cache one result set.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: ENOSPC FailedAssertion("!(RefCountErrors == 0)"
Next
From: Alvaro Herrera
Date:
Subject: Re: Possible bug in logical replication.