-
- Downloads
Clean up a couple of ad-hoc computations of the maximum number of tuples
on a page, as suggested by ITAGAKI Takahiro. Also, change a few places that were using some other estimates of max-items-per-page to consistently use MaxOffsetNumber. This is conservatively large --- we could have used the new MaxHeapTuplesPerPage macro, or a similar one for index tuples --- but those places are simply declaring a fixed-size buffer and assuming it will work, rather than actively testing for overrun. It seems safer to size these buffers in a way that can't overflow even if the page is corrupt.
Showing
- src/backend/access/gist/gistvacuum.c 3 additions, 3 deletionssrc/backend/access/gist/gistvacuum.c
- src/backend/access/nbtree/nbtree.c 2 additions, 2 deletionssrc/backend/access/nbtree/nbtree.c
- src/backend/commands/vacuum.c 3 additions, 3 deletionssrc/backend/commands/vacuum.c
- src/backend/commands/vacuumlazy.c 4 additions, 7 deletionssrc/backend/commands/vacuumlazy.c
- src/backend/nodes/tidbitmap.c 2 additions, 2 deletionssrc/backend/nodes/tidbitmap.c
- src/include/access/htup.h 11 additions, 1 deletionsrc/include/access/htup.h
Loading
Please register or sign in to comment