Set visibility map bit after HOT prune
Pavan Deolasee <pavan.deolasee@gmail.com>
From: Pavan Deolasee <pavan.deolasee@gmail.com>
To: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2012-12-15T12:42:13Z
Lists: pgsql-hackers
Attachments
- hot-prune-set-all-visible-v2.patch (application/octet-stream) patch v2
We discussed this idea in the past [1] and Robert recently again mentioned this in another thread [2]. Please see a rebased/revised patch attached with the mail. This is mostly similar to what I's submitted in [1] except some additions to also compute visibility cut-off XID. I also removed a warning that I'd added to the previous patch to report the case when the page's all-visible bit is already set, but our HOT prune scan finds it otherwise. This is not to hide the warning the earlier reviewer had reported, but I think its not required because we do those consistency checks at other places anyways. I've run several rounds of pgbench (-s 10 -c 10 -T 300) and did not find any issues. I don't see noticeable performance again/drop. But again pgbench may not be the most suitable test benchmark to test this. I think we will see positive differences in vacuum scans and also queries that are benefited from index-only scans. An early setting of the visibility map bit can help those two scenarios. Thanks, Pavan 1. http://archives.postgresql.org/pgsql-hackers/2010-02/msg02344.php 2. http://archives.postgresql.org/message-id/CA+TgmoZHWN1+N_CGD3hx=DJPHkd69c8x2r2EiQ5=c8yxNrc8wA@mail.gmail.com -- Pavan Deolasee http://www.linkedin.com/in/pavandeolasee