Re: pgsql: Fix a violation of WAL coding rules in the recent patch to - Mailing list pgsql-committers

From Heikki Linnakangas
Subject Re: pgsql: Fix a violation of WAL coding rules in the recent patch to
Date
Msg-id 4A922F69.9040402@enterprisedb.com
Whole thread Raw
In response to pgsql: Fix a violation of WAL coding rules in the recent patch to  (tgl@postgresql.org (Tom Lane))
List pgsql-committers
Tom Lane wrote:
> --- 74,80 ----
>    * That might actually be OK for the index scans, though. The newly inserted
>    * tuple wouldn't have an index pointer yet, so all tuples reachable from an
>    * index would still be visible to all other backends, and deletions wouldn't
> !  * be visible to other backends yet.  (But HOT breaks that argument, no?)

The same argument holds for HOT. The new tuple has no index pointer, so
it's not directly reachable from the index. Moreover, the value in the
index is correct for both tuple versions, because a HOT update doesn't
change index keys.

In fact, if we only maintained the visibility map to enable index-only
scans, a HOT update wouldn't need to clear the bit in the visibility map
at all.

--
  Heikki Linnakangas
  EnterpriseDB   http://www.enterprisedb.com

pgsql-committers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: pgsql: Fix a violation of WAL coding rules in the recent patch to
Next
From: alvherre@postgresql.org (Alvaro Herrera)
Date:
Subject: pgsql: Remove unused variable.