Re: Deleting older versions in unique indexes to avoid page splits

Victor Yegorov <vyegorov@gmail.com>

From: Victor Yegorov <vyegorov@gmail.com>
To: Zhihong Yu <zyu@yugabyte.com>
Cc: Peter Geoghegan <pg@bowt.ie>, Heikki Linnakangas <hlinnaka@iki.fi>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2020-12-31T19:14:46Z
Lists: pgsql-hackers
чт, 31 дек. 2020 г. в 20:01, Zhihong Yu <zyu@yugabyte.com>:

> For v12-0001-Pass-down-logically-unchanged-index-hint.patch
>
> +   if (hasexpression)
> +       return false;
> +
> +   return true;
>
> The above can be written as return !hasexpression;
>

To be honest, I prefer the way Peter has it in his patch.
Yes, it's possible to shorten this part. But readability is hurt — for
current code I just read it, for the suggested change I need to think about
it.

-- 
Victor Yegorov

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Enhance nbtree index tuple deletion.

  2. Pass down "logically unchanged index" hint.

  3. Fix index deletion latestRemovedXid bug.

  4. Deprecate nbtree's BTP_HAS_GARBAGE flag.