Re: Again, sorry, caching. - Mailing list pgsql-hackers

From Stephan Szabo
Subject Re: Again, sorry, caching.
Date
Msg-id 20020316090846.K71606-100000@megazone23.bigpanda.com
Whole thread Raw
In response to Again, sorry, caching.  (mlw <markw@mohawksoft.com>)
List pgsql-hackers
> I was thinking that it could be implemented as a keyword or comment in a query.
> Such as:
>
> select * from table where column = 'foo' cacheable
> or
> select * from table where column = 'bar' /* cacheable */


> Having caching within PostgreSQL will be good for data integrity. Application
> caches can't tell when an update/delete/insert happens, they often have to use
> a time-out mechanism.
>
> OK, let me have it, tell me how terrible an idea this is. tell me how wrong I
> am.

I don't think it's a bad idea, but a cache that takes a query string (or
subquery string) and looks for a match based on that is flawed without
special consideration to non-cacheable functions and constructs
(CURRENT_USER, things that depend on timezone, things that depend on
datestyle). We'd also need to work out an appropriate mechanism to deal
with cache invalidation and adding things to the cache.



pgsql-hackers by date:

Previous
From: "Rod Taylor"
Date:
Subject: plsql as an officially supported language?
Next
From: Tom Lane
Date:
Subject: Re: Client/Server compression?