Re: HOT patch, missing things

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Gregory Stark <stark(at)enterprisedb(dot)com>
Cc: "Pavan Deolasee" <pavan(dot)deolasee(at)gmail(dot)com>, "Heikki Linnakangas" <heikki(at)enterprisedb(dot)com>, "Pavan Deolasee" <pavan(at)enterprisedb(dot)com>, "PostgreSQL-development" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: HOT patch, missing things
Date: 2007-08-09 17:14:34
Message-ID: 17274.1186679674@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Gregory Stark <stark(at)enterprisedb(dot)com> writes:
> I agree about the costs for evaluating the expressions. But a COLD update is
> certainly going to have to evaluate both expressions once. The only additional
> cost here is that HOT is going to have to evaluate the *old* expression as
> well. So it's at worst twice as expensive as a normal COLD update.

What's bothering me is the case where we evaluate the expression twice,
find it doesn't match, and fall through to the COLD update logic which
will do it a third time.

> I think I'm leaning towards doing a binary comparison of the
> parameters to the expressions.

Yeah, we could simply insist on no change to any column that's used by
any of the expressions. That would be cheap to test.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2007-08-09 17:58:21 Re: change name of redirect_stderr?
Previous Message Gregory Stark 2007-08-09 17:09:30 Re: HOT patch, missing things