Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1xLMmL-00000001TPJ-2tHN for pgsql-hackers@arkaria.postgresql.org; Mon, 26 Oct 2026 15:38:31 +0000 Received: from localhost ([127.0.0.1]:59030 helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.98.2) (envelope-from ) id 1xLMmK-00000006JVW-330V for pgsql-hackers@arkaria.postgresql.org; Mon, 26 Oct 2026 15:38:28 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]:45852) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1xLMmK-00000006JVN-1115 for pgsql-hackers@lists.postgresql.org; Mon, 26 Oct 2026 15:38:28 +0000 Received: from mail-106117.protonmail.ch ([79.135.106.117]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1xLMmH-000000015EC-2Ufz for pgsql-hackers@postgresql.org; Mon, 26 Oct 2026 15:38:27 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=burd.me; s=protonmail; t=1793029104; x=1793288304; bh=SJNOLwCO8l6n59ayLDjQpRufGLDoxcRUcuKQ8ua1knQ=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=Y5Tz1+2sZ/1v6AdZduvGHbyCmluRRTLpkhGBGlfMVQOAOJPKx1UGH91+QJ39OJT2W lrWdA/lDl5on+OGBPeMqoYPxtCrloMfHpR9kRQ/LMUWbOmVcyPCCj3E6Xd0E8jWJHj jBhedou1ajHSvdFdXsTZgwCv/WiEKsMe8hydiXo3FZpHoynG6ATfhKpFIjDgAkDh7s vCb1QU8ds0T070857dx7lSO61ZXCbkLEvibudyRBXoDyqTrCzqokBvj2/e0zC8tUWe F7J4TpbKfhK82S/d7Pdn3Y1IkeyC+sFNSB+/3jbNy8YHB96I5CQrVIgmTtEXN4Sr9O K+CLvenSHc+7w== Date: Mon, 26 Oct 2026 15:38:19 +0000 To: pgsql-hackers@postgresql.org From: Greg Burd Cc: andres@anarazel.de, michael@paquier.xyz, pgsql@j-davis.com, 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 Message-ID: In-Reply-To: <12CB9268-9A1C-4555-96BB-E3EA01B14C0F@anarazel.de> References: <12CB9268-9A1C-4555-96BB-E3EA01B14C0F@anarazel.de> Feedback-ID: 2668248:user:proton X-Pm-Message-ID: 5f0945883b6182ac6a65fdcc594c070fc2853f71 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2026-10-26 Andres Freund wrote: > I think they're almost unused and don't offer enough advantage over btree > (and perform catastrophically bad in many cases). Instead of making them = WAL > logged a few years back; we should have just ripped them out. Fair, whether hash earns its place is a bigger conversation than this bug. I'll just note one data point from the other thread I have open: a good part of the "catastrophically bad in many cases" is the metapage tuple counter serialising every insert on one buffer, and that looks removable. Inserts stop touching the metapage on the common path and hash then scales like btree on a concurrent insert workload in my measurements. That doesn't change your conclusion about large-key handling, but it does move some of the "performs badly" into "performed badly". > The advantage hash does have, i.e. large key handling, would have better = been > addressed by adding support to transparently btree indexing a hash of the= key > + recheck. No disagreement that that would have been the better design. It's not where we are, though, and ripping out a shipped, WAL-logged, user-visible AM is its own multi-release project. Which leaves the thing this thread actually needs a decision on, independent of hash's long-term fate: master faults a standby under wal_consistency_checking=3D'hash' today. The one-line fix (skip the full-page image for a REGBUF_NO_CHANGE block, which contradicts the flag's own contract to take) stops that and Michael's OK with it for v17+. You'd said you'd rather master wait for the proper hash rework. I'm fine either way, but if master isn't getting the flag-level fix now, I'd like the rework to be the tracked item for master rather than a someday, the crash is live on master. So: flag fix in master now plus rework as follow-up, or rework-only for master? I'll build whichever, I just don't want it to stall into neither. best, -greg