pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jeff Davis <pgsql@j-davis.com>
To: shihao zhong <zhong950419@gmail.com>
Cc: Andres Freund <andres@anarazel.de>
Cc: Greg Burd <greg@burd.me>
Cc: pgsql-hackers@postgresql.org
Cc: michael@paquier.xyz
Cc: thomas.munro@gmail.com
Cc: exclusion@gmail.com
Cc: amit.kapila16@gmail.com
Cc: hlinnaka@iki.fi
Subject: Re: WAL record CRC calculated incorrectly because of underlying buffer modification
Date: Fri, 30 Oct 2026 12:13:47 -0700
Message-ID: <99401f6a9cc4f2545a9afcffce68fdf162bba10a.camel@j-davis.com> (raw)
In-Reply-To: <CAGRkXqRv-mUmB=+qKu_nME=QG=2Rhkv-Sq3LdVSrs_Y95E6pkw@mail.gmail.com>
References: <ats4pi-RM0Uom0T9@floki>
	<at7GY97qm-zGyanz@paquier.xyz>
	<o564wjvhkq7o7jl7fwbst5dw5rowekcfizmbp4odstjvoh5vve@6jt34ntyeca4>
	<at9iIYPKF741ilW_@floki>
	<12CB9268-9A1C-4555-96BB-E3EA01B14C0F@anarazel.de>
	<2415c781fae2f9139a2397726c23b8cd1d23f8c0.camel@j-davis.com>
	<CAGRkXqRv-mUmB=+qKu_nME=QG=2Rhkv-Sq3LdVSrs_Y95E6pkw@mail.gmail.com>

On Thu, 2026-10-29 at 22:51 -0400, shihao zhong wrote:
> I agree with that, but I think there are still a decent number of
> users
> who are using hash indexes for different reasons.

...

> 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.

Yes, that makes sense to me. If you think there's benefit to be had,
please go ahead in a new thread.

> 
> 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.

Right, there are a few details to work out. But I do think there's room
to solve this in the optimizer rather than add more special cases to
index DDL and the AMs.

We could start by saying it only works if f() is part of a hash
opclass, or something.

Regards,
	Jeff Davis






view thread (37+ messages)  latest in thread

Message-ID: <99401f6a9cc4f2545a9afcffce68fdf162bba10a.camel@j-davis.com>
Permalink:  ../99401f6a9cc4f2545a9afcffce68fdf162bba10a.camel@j-davis.com/
Also on:    postgresql.org/message-id/99401f6a9cc4f2545a9afcffce68fdf162bba10a.camel@j-davis.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: pgsql@j-davis.com, zhong950419@gmail.com, andres@anarazel.de, greg@burd.me, michael@paquier.xyz, thomas.munro@gmail.com, exclusion@gmail.com, amit.kapila16@gmail.com, hlinnaka@iki.fi
  Subject: Re: WAL record CRC calculated incorrectly because of underlying buffer modification
  In-Reply-To: <99401f6a9cc4f2545a9afcffce68fdf162bba10a.camel@j-davis.com>
  References: <ats4pi-RM0Uom0T9@floki> <at7GY97qm-zGyanz@paquier.xyz> <o564wjvhkq7o7jl7fwbst5dw5rowekcfizmbp4odstjvoh5vve@6jt34ntyeca4> <at9iIYPKF741ilW_@floki> <12CB9268-9A1C-4555-96BB-E3EA01B14C0F@anarazel.de> <2415c781fae2f9139a2397726c23b8cd1d23f8c0.camel@j-davis.com> <CAGRkXqRv-mUmB=+qKu_nME=QG=2Rhkv-Sq3LdVSrs_Y95E6pkw@mail.gmail.com> <99401f6a9cc4f2545a9afcffce68fdf162bba10a.camel@j-davis.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox