Re: Page Scan Mode in Hash Index
Amit Kapila <amit.kapila16@gmail.com>
From: Amit Kapila <amit.kapila16@gmail.com>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Jesper Pedersen <jesper.pedersen@redhat.com>,
Ashutosh Sharma <ashu.coek88@gmail.com>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2017-09-20T03:34:29Z
Lists: pgsql-hackers
On Tue, Sep 19, 2017 at 9:49 PM, Robert Haas <robertmhaas@gmail.com> wrote: > On Thu, Aug 24, 2017 at 11:26 AM, Jesper Pedersen > <jesper.pedersen@redhat.com> wrote: >> Based on the feedback in this thread, I have moved the patch to "Ready for >> Committer". > > Reviewing 0001: > > _hash_readpage gets the page LSN to see if we can apply LP_DEAD hints, > but if the table is unlogged or temporary, the LSN will never change, > so the test in _hash_kill_items will always think that it's OK to > apply the hints. (This seems like it might be a pretty serious > problem, because I'm not sure what would be a viable workaround.) > This point has been discussed above [1] and to avoid this problem we are keeping the scan always behind vacuum for unlogged and temporary tables as we are doing without this patch. That will ensure vacuum won't be able to remove the TIDs which we are going to mark as dead. This has been taken care in patch 0003. I understand that this is slightly ugly, but the other alternative (as mentioned in the email [1]) is much worse. [1] - https://www.postgresql.org/message-id/CAA4eK1J6xiJUOidBaOt0iPsAdS0%2Bp5PoKFf1R2yVjTwrY_4snA%40mail.gmail.com -- With Regards, Amit Kapila. EnterpriseDB: http://www.enterprisedb.com
Commits
-
Remove lsn from HashScanPosData.
- 22c5e73562c5 11.0 landed
-
Fix trivial mistake in README.
- 79a4a665c046 11.0 landed
-
hash: Implement page-at-a-time scan.
- 7c75ef571579 11.0 landed
-
Reduce pinning and buffer content locking for btree scans.
- 2ed5b87f96d4 9.5.0 cited