Re: REPLICA IDENTITY FULL

Поиск
Список
Период
Сортировка
От Noah Misch
Тема Re: REPLICA IDENTITY FULL
Дата
Msg-id 20171205031556.GA3265701@rfd.leadboat.com
обсуждение исходный текст
Ответ на Re: [HACKERS] REPLICA IDENTITY FULL  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Ответы Re: REPLICA IDENTITY FULL  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Список 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.eisentraut@2ndquadrant.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().


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Greg Stark
Дата:
Сообщение: Re: ExplainOneQuery_hook ignored for EXPLAIN EXECUTE
Следующее
От: Amit Kapila
Дата:
Сообщение: Usage of epoch in txid_current