From: | Noah Misch <noah(at)leadboat(dot)com> |
---|---|
To: | Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Tatsuo Ishii <ishii(at)sraoss(dot)co(dot)jp>, craig(at)2ndquadrant(dot)com |
Subject: | Re: REPLICA IDENTITY FULL |
Date: | 2017-12-05 03:15:56 |
Message-ID: | 20171205031556.GA3265701@rfd.leadboat.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Jun 23, 2017 at 03:45:48PM -0400, Peter Eisentraut wrote:
> On 6/23/17 13:14, Alvaro Herrera wrote:
> > Andres Freund wrote:
> >> On 2017-06-23 13:05:21 -0400, Alvaro Herrera wrote:
> >>> Tom Lane wrote:
> >>>> Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> writes:
> >>>>> Any thoughts about keeping datumAsEqual() as a first check? I did some
> >>>>> light performance tests, but it was inconclusive.
> >>>>
> >>>> Seems like it would tend to be a win if, in fact, the values are
> >>>> usually equal. If they're usually not, then it's a loser. Do
> >>>> we have any feeling for which case is more common?
> >>
> >> Seems like a premature optimization to me - if you care about
> >> performance and do this frequently, you're not going to end up using
> >> FULL. If we want to performance optimize, it'd probably better to
> >> lookup candidate keys and use those if available.
> >
> > I can get behind that argument.
>
> Thanks for the feedback. I have committed it after removing the
> datumIsEqual() call.
While reviewing this patch, I noticed a couple of nearby defects:
- RelationFindReplTupleSeq() says "Note that this stops on the first matching
tuple.", but that's not the case. It visits every row in the table, and it
uses the last match. The claimed behavior sounds more attractive.
- RelationFindReplTupleSeq() has comment "/* Start an index scan. */", an
inapplicable copy-paste from RelationFindReplTupleByIndex().
From | Date | Subject | |
---|---|---|---|
Next Message | Amit Kapila | 2017-12-05 03:19:10 | Usage of epoch in txid_current |
Previous Message | Greg Stark | 2017-12-05 02:43:15 | Re: ExplainOneQuery_hook ignored for EXPLAIN EXECUTE |