mirror of
https://github.com/postgres/postgres.git
synced 2025-10-21 02:52:47 +03:00
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
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user