pgsql: Fix more hash index bugs around marking buffers dirty.

From: Robert Haas <rhaas(at)postgresql(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix more hash index bugs around marking buffers dirty.
Date: 2016-12-16 14:58:46
Message-ID: E1cHtyA-0005J9-Jg@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix more hash index bugs around marking buffers dirty.

In _hash_freeovflpage(), if we're freeing the overflow page that
immediate follows the page to which tuples are being moved (the
confusingly-named "write buffer"), don't forget to mark that
page dirty after updating its hasho_nextblkno.

In _hash_squeezebucket(), it's not necessary to mark the primary
bucket page dirty if there are no overflow pages, because there's
nothing to squeeze in that case.

Amit Kapila, with help from Kuntal Ghosh and Dilip Kumar, after
an initial trouble report by Jeff Janes.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/6a4fe1127c5a0ea1515589e416aa29e088170c0e

Modified Files
--------------
src/backend/access/hash/hashovfl.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2016-12-16 15:11:13 pgsql: Unbreak Finalize HashAggregate over Partial HashAggregate.
Previous Message Robert Haas 2016-12-16 14:44:33 pgsql: Remove _hash_wrtbuf() in favor of calling MarkBufferDirty().