Re: REPLICA IDENTITY FULL

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Tatsuo Ishii <ishii(at)sraoss(dot)co(dot)jp>, craig(at)2ndquadrant(dot)com, pgsql-hackers(at)postgresql(dot)org
Subject: Re: REPLICA IDENTITY FULL
Date: 2017-06-23 17:05:21
Message-ID: 20170623170521.zn5pwvqsjyv73j2y@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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?

What about keeping the datumIsEqual test for fixed length pass-by-value
types (I'm mostly thinking about fixed-width integers here ...) and
always use the full blown equality comparison for anything more
elaborate than that?

Though, thinking about it, maybe the datumIsEqual test would give the
wrong answer for floating point values, and there'd be no fallback to
equality with the logic I propose. But then maybe that's all right ---
who in their right minds would use floating point columns as part of
replica identity ...?

--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2017-06-23 17:10:22 Re: REPLICA IDENTITY FULL
Previous Message Alvaro Herrera 2017-06-23 16:35:40 Re: Setting pd_lower in GIN metapage