Re: WAL record CRC calculated incorrectly because of underlying buffer modification

From: shihao zhong <zhong950419(at)gmail(dot)com>
To: Jeff Davis <pgsql(at)j-davis(dot)com>
Cc: Andres Freund <andres(at)anarazel(dot)de>, Greg Burd <greg(at)burd(dot)me>, pgsql-hackers(at)postgresql(dot)org, michael(at)paquier(dot)xyz, thomas(dot)munro(at)gmail(dot)com, exclusion(at)gmail(dot)com, amit(dot)kapila16(at)gmail(dot)com, hlinnaka(at)iki(dot)fi
Subject: Re: WAL record CRC calculated incorrectly because of underlying buffer modification
Date: 2026-10-30 02:51:50
Message-ID: CAGRkXqRv-mUmB=+qKu_nME=QG=2Rhkv-Sq3LdVSrs_Y95E6pkw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Jeff,

> At this point, the bar is quite high for convincing people to use them.

I agree with that, but I think there are still a decent number of users
who are using hash indexes for different reasons.

I also did some research this afternoon and found that Postgres is the
only mainline DB that still provides an on-disk hash index. So either
we are wrong, or that could be our competitive edge on certain use
cases. I am personally not an expert on hash indexes, so I am not sure
which one I will end up with.

Andres said, the long keys problem with btrees is
> incidental, and can be solved other ways.

Looks like this is an interesting problem. I do agree that if there is
any potential optimization for btree, we should take it all. If nobody
volunteers, I can create a different thread and create a POC for it
after 19 GAed.

> If there's no index on (x) but there's an index on (f(x)), then we can
> see if f is a member of a hash opclass, or if it's IMMUTABLE &
> LEAKPROOF, and I think that's enough.

I am not sure. I know some types' = has special logic, where it may not
mean they are the same.

For example, 'ABC' = 'abc' is true
with a case-insensitive collation. But md5() gives different results.

Thanks,
Shihao

In response to

Browse pgsql-hackers by date

  From Date Subject
Previous Message shihao zhong 2026-10-30 02:30:54 Re: pg_upgrade doesn't copy ICU rules on template0