diff options
| author | Heikki Linnakangas | 2024-04-01 21:56:05 +0000 |
|---|---|---|
| committer | Heikki Linnakangas | 2024-04-01 21:56:05 +0000 |
| commit | 3d0f730bf19fbc70cca58818c1ad7415e5aa7d62 (patch) | |
| tree | abdfaa169dcb09e48f50ca59805213a67500265f /src/include | |
| parent | 959b38d770ba1f8f35edab27ef3ccf8b1d99f5dd (diff) | |
Introduce 'options' argument to heap_page_prune()
Currently there is only one option, HEAP_PAGE_PRUNE_MARK_UNUSED_NOW
which replaces the old boolean argument, but upcoming patches will
introduce at least one more. Having a lot of boolean arguments makes
it hard to see at the call sites what the arguments mean, so prefer a
bitmask of options with human-readable names.
Author: Melanie Plageman <melanieplageman@gmail.com>
Author: Heikki Linnakangas <heikki.linnakangas@iki.fi>
Discussion: https://www.postgresql.org/message-id/20240401172219.fngjosaqdgqqvg4e@liskov
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/access/heapam.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/include/access/heapam.h b/src/include/access/heapam.h index 32a3fbce961..b632fe953c4 100644 --- a/src/include/access/heapam.h +++ b/src/include/access/heapam.h @@ -36,6 +36,9 @@ #define HEAP_INSERT_NO_LOGICAL TABLE_INSERT_NO_LOGICAL #define HEAP_INSERT_SPECULATIVE 0x0010 +/* "options" flag bits for heap_page_prune */ +#define HEAP_PAGE_PRUNE_MARK_UNUSED_NOW (1 << 0) + typedef struct BulkInsertStateData *BulkInsertState; struct TupleTableSlot; struct VacuumCutoffs; @@ -331,7 +334,7 @@ struct GlobalVisState; extern void heap_page_prune_opt(Relation relation, Buffer buffer); extern void heap_page_prune(Relation relation, Buffer buffer, struct GlobalVisState *vistest, - bool mark_unused_now, + int options, PruneResult *presult, PruneReason reason, OffsetNumber *off_loc); |
