Re: HOT patch, missing things - Mailing list pgsql-hackers

From Tom Lane
Subject Re: HOT patch, missing things
Date
Msg-id 17274.1186679674@sss.pgh.pa.us
Whole thread Raw
In response to Re: HOT patch, missing things  (Gregory Stark <stark@enterprisedb.com>)
Responses Re: HOT patch, missing things  ("Pavan Deolasee" <pavan.deolasee@gmail.com>)
List pgsql-hackers
Gregory Stark <stark@enterprisedb.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


pgsql-hackers by date:

Previous
From: Gregory Stark
Date:
Subject: Re: HOT patch, missing things
Next
From: Tom Lane
Date:
Subject: Re: change name of redirect_stderr?