pgsql: Fix checksum calculation in the new sorting GiST build.

From: Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix checksum calculation in the new sorting GiST build.
Date: 2020-09-21 11:57:48
Message-ID: E1kKKS4-0006Gy-Bd@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix checksum calculation in the new sorting GiST build.

Since we're bypassing the buffer manager, we need to call
PageSetChecksumInplace() directly. As reported by Justin Pryzby.

In the passing, add RelationOpenSmgr() calls before all smgrwrite() and
smgrextend() calls. Tom added one before the first smgrextend() call in
commit c2bb287025, which seems to be enough, but let's play it safe and
do it before each one. That's how it's done in the similar code in
nbtsort.c, too.

Discussion: https://www.postgresql.org/message-id/20200920224446.GF30557@telsasoft.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/c47a240fe6db8293e2de1565233faee40afa64b6

Modified Files
--------------
src/backend/access/gist/gistbuild.c | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2020-09-21 15:06:30 pgsql: Standardize order of use strict and use warnings in Perl code
Previous Message Peter Eisentraut 2020-09-21 08:18:42 pgsql: Translation updates