Refactor reloption handling for index AMs in-core
Michael Paquier <michael@paquier.xyz>
Refactor reloption handling for index AMs in-core This reworks the reloption parsing and build of a couple of index AMs by creating new structures for each index AM's options. This split was already done for BRIN, GIN and GiST (which actually has a fillfactor parameter), but not for hash, B-tree and SPGiST which relied on StdRdOptions due to an overlap with the default option set. This saves a couple of bytes for rd_options in each relcache entry with indexes making use of relation options, and brings more consistency between all index AMs. While on it, add a couple of AssertMacro() calls to make sure that utility macros to grab values of reloptions are used with the expected index AM. Author: Nikolay Shaplov Reviewed-by: Amit Langote, Michael Paquier, Álvaro Herrera, Dent John Discussion: https://postgr.es/m/4127670.gFlpRb6XCm@x200m
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/access/common/reloptions.c | modified | +1 −3 |
| src/backend/access/hash/hashpage.c | modified | +1 −1 |
| src/backend/access/hash/hashutil.c | modified | +8 −1 |
| src/backend/access/nbtree/nbtree.c | modified | +2 −2 |
| src/backend/access/nbtree/nbtsort.c | modified | +2 −2 |
| src/backend/access/nbtree/nbtsplitloc.c | modified | +1 −1 |
| src/backend/access/nbtree/nbtutils.c | modified | +12 −1 |
| src/backend/access/spgist/spgutils.c | modified | +10 −3 |
| src/include/access/brin.h | modified | +6 −2 |
| src/include/access/gin_private.h | modified | +7 −2 |
| src/include/access/hash.h | modified | +16 −0 |
| src/include/access/nbtree.h | modified | +18 −0 |
| src/include/access/spgist.h | modified | +0 −4 |
| src/include/access/spgist_private.h | modified | +22 −0 |
| src/include/utils/rel.h | modified | +1 −2 |
| src/tools/pgindent/typedefs.list | modified | +3 −0 |
Discussion
- Re: [PATCH] Do not use StdRdOptions in Access Methods 41 messages · 2019-10-06 → 2019-11-25