Re: Write Ahead Logging for Hash Indexes
Robert Haas <robertmhaas@gmail.com>
From: Robert Haas <robertmhaas@gmail.com>
To: Amit Kapila <amit.kapila16@gmail.com>
Cc: Jeff Janes <jeff.janes@gmail.com>,
Jesper Pedersen <jesper.pedersen@redhat.com>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2016-12-22T16:26:29Z
Lists: pgsql-hackers
Attachments
- remove-chgbufaccess.patch (text/x-diff) patch
On Mon, Dec 5, 2016 at 2:46 AM, Amit Kapila <amit.kapila16@gmail.com> wrote: >> I'll review after that, since I have other things to review meanwhile. > > Attached, please find the rebased patch attached with this e-mail. > There is no fundamental change in patch except for adapting the new > locking strategy in squeeze operation. I have done the sanity testing > of the patch with master-standby setup and Kuntal has helped me to > verify it with his wal-consistency checker patch. This patch again needs a rebase, but before you do that I'd like to make it harder by applying the attached patch to remove _hash_chgbufaccess(), which I think is a bad plan for more or less the same reasons that motivated the removal of _hash_wrtbuf() in commit 25216c98938495fd741bf585dcbef45b3a9ffd40. I think there's probably more simplification and cleanup that can be done afterward in the wake of this; what I've done here is just a mechanical replacement of _hash_chgbufaccess() with LockBuffer() and/or MarkBufferDirty(). The point is that having MarkBufferDirty() calls happen implicitly instead some other function is not what we want for write-ahead logging. Your patch gets rid of that, too; this is just doing it somewhat more thoroughly. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company
Commits
-
Add a regression test for snapshot too old with hash indexes.
- 42bdaebf1618 10.0 landed
-
hash: Add write-ahead logging support.
- c11453ce0aea 10.0 landed
-
Improve coding in _hash_addovflpage.
- e898437460f5 10.0 cited
-
Remove _hash_wrtbuf() in favor of calling MarkBufferDirty().
- 25216c989384 10.0 cited
-
Improve hash index bucket split behavior.
- 6d46f4783efe 10.0 cited