Still more code review for single-page hash vacuuming

Enterprise / PostgreSQL - Robert Haas [postgresql.org] - 27 March 2017 12:51 EDT

Most seriously, fix use of incorrect block ID, per a report from Jeff Janes that it causes a crash and a diagnosis from Amit Kapila.

Improve consistency between the hash and btree versions of this code by adding back a PANIC that btree has, and by registering data in the xlog record in the same way, per complaints from Jeff Janes and Amit Kapila.

Tidy up some minor cosmetic points, per complaints from Amit Kapila.

Patch by Ashutosh Sharma, reviewed by Amit Kapila, and tested by Jeff Janes.

Discussion: http://postgr.es/m/CAMkU=1w-9Qe=Ff1o6bSaXpNO9wqpo7_9GL8_CVhw4BoVVHasqg@mail.gmail.com

c4c5154 Still more code review for single-page hash vacuuming.
src/backend/access/hash/hash_xlog.c | 30 +++++++++++++-----------------
src/backend/access/hash/hashinsert.c | 17 +++++++++--------
src/backend/access/rmgrdesc/hashdesc.c | 2 +-
src/include/access/hash_xlog.h | 6 ++++--
4 files changed, 27 insertions(+), 28 deletions(-)

Upstream: git.postgresql.org


  • Share