PostgreSQL Source Code git master
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
blutils.c
Go to the documentation of this file.
1/*-------------------------------------------------------------------------
2 *
3 * blutils.c
4 * Bloom index utilities.
5 *
6 * Portions Copyright (c) 2016-2025, PostgreSQL Global Development Group
7 * Portions Copyright (c) 1990-1993, Regents of the University of California
8 *
9 * IDENTIFICATION
10 * contrib/bloom/blutils.c
11 *
12 *-------------------------------------------------------------------------
13 */
14#include "postgres.h"
15
16#include "access/amapi.h"
17#include "access/generic_xlog.h"
18#include "access/reloptions.h"
19#include "bloom.h"
20#include "commands/vacuum.h"
21#include "storage/bufmgr.h"
22#include "storage/indexfsm.h"
23#include "utils/memutils.h"
24#include "varatt.h"
25
26/* Signature dealing macros - note i is assumed to be of type int */
27#define GETWORD(x,i) ( *( (BloomSignatureWord *)(x) + ( (i) / SIGNWORDBITS ) ) )
28#define CLRBIT(x,i) GETWORD(x,i) &= ~( 0x01 << ( (i) % SIGNWORDBITS ) )
29#define SETBIT(x,i) GETWORD(x,i) |= ( 0x01 << ( (i) % SIGNWORDBITS ) )
30#define GETBIT(x,i) ( (GETWORD(x,i) >> ( (i) % SIGNWORDBITS )) & 0x01 )
31
33
34/* Kind of relation options for bloom index */
36
37/* parse table for fillRelOptions */
39
40static int32 myRand(void);
41static void mySrand(uint32 seed);
42
43/*
44 * Module initialize function: initialize info about Bloom relation options.
45 *
46 * Note: keep this in sync with makeDefaultBloomOptions().
47 */
48void
50{
51 int i;
52 char buf[16];
53
55
56 /* Option for length of signature */
58 "Length of signature in bits",
61 bl_relopt_tab[0].optname = "length";
63 bl_relopt_tab[0].offset = offsetof(BloomOptions, bloomLength);
64
65 /* Number of bits for each possible index column: col1, col2, ... */
66 for (i = 0; i < INDEX_MAX_KEYS; i++)
67 {
68 snprintf(buf, sizeof(buf), "col%d", i + 1);
70 "Number of bits generated for each index column",
74 buf);
76 bl_relopt_tab[i + 1].offset = offsetof(BloomOptions, bitSize[0]) + sizeof(int) * i;
77 }
78}
79
80/*
81 * Construct a default set of Bloom options.
82 */
83static BloomOptions *
85{
87 int i;
88
90 /* Convert DEFAULT_BLOOM_LENGTH from # of bits to # of words */
91 opts->bloomLength = (DEFAULT_BLOOM_LENGTH + SIGNWORDBITS - 1) / SIGNWORDBITS;
92 for (i = 0; i < INDEX_MAX_KEYS; i++)
93 opts->bitSize[i] = DEFAULT_BLOOM_BITS;
95 return opts;
96}
97
98/*
99 * Bloom handler function: return IndexAmRoutine with access method parameters
100 * and callbacks.
101 */
102Datum
104{
106
107 amroutine->amstrategies = BLOOM_NSTRATEGIES;
108 amroutine->amsupport = BLOOM_NPROC;
110 amroutine->amcanorder = false;
111 amroutine->amcanorderbyop = false;
112 amroutine->amcanhash = false;
113 amroutine->amconsistentequality = false;
114 amroutine->amconsistentordering = false;
115 amroutine->amcanbackward = false;
116 amroutine->amcanunique = false;
117 amroutine->amcanmulticol = true;
118 amroutine->amoptionalkey = true;
119 amroutine->amsearcharray = false;
120 amroutine->amsearchnulls = false;
121 amroutine->amstorage = false;
122 amroutine->amclusterable = false;
123 amroutine->ampredlocks = false;
124 amroutine->amcanparallel = false;
125 amroutine->amcanbuildparallel = false;
126 amroutine->amcaninclude = false;
127 amroutine->amusemaintenanceworkmem = false;
128 amroutine->amparallelvacuumoptions =
130 amroutine->amkeytype = InvalidOid;
131
132 amroutine->ambuild = blbuild;
133 amroutine->ambuildempty = blbuildempty;
134 amroutine->aminsert = blinsert;
135 amroutine->aminsertcleanup = NULL;
136 amroutine->ambulkdelete = blbulkdelete;
137 amroutine->amvacuumcleanup = blvacuumcleanup;
138 amroutine->amcanreturn = NULL;
139 amroutine->amcostestimate = blcostestimate;
140 amroutine->amgettreeheight = NULL;
141 amroutine->amoptions = bloptions;
142 amroutine->amproperty = NULL;
143 amroutine->ambuildphasename = NULL;
144 amroutine->amvalidate = blvalidate;
145 amroutine->amadjustmembers = NULL;
146 amroutine->ambeginscan = blbeginscan;
147 amroutine->amrescan = blrescan;
148 amroutine->amgettuple = NULL;
149 amroutine->amgetbitmap = blgetbitmap;
150 amroutine->amendscan = blendscan;
151 amroutine->ammarkpos = NULL;
152 amroutine->amrestrpos = NULL;
153 amroutine->amestimateparallelscan = NULL;
154 amroutine->aminitparallelscan = NULL;
155 amroutine->amparallelrescan = NULL;
156 amroutine->amtranslatestrategy = NULL;
157 amroutine->amtranslatecmptype = NULL;
158
159 PG_RETURN_POINTER(amroutine);
160}
161
162/*
163 * Fill BloomState structure for particular index.
164 */
165void
167{
168 int i;
169
170 state->nColumns = index->rd_att->natts;
171
172 /* Initialize hash function for each attribute */
173 for (i = 0; i < index->rd_att->natts; i++)
174 {
175 fmgr_info_copy(&(state->hashFn[i]),
178 state->collations[i] = index->rd_indcollation[i];
179 }
180
181 /* Initialize amcache if needed with options from metapage */
182 if (!index->rd_amcache)
183 {
184 Buffer buffer;
185 Page page;
186 BloomMetaPageData *meta;
188
189 opts = MemoryContextAlloc(index->rd_indexcxt, sizeof(BloomOptions));
190
193
194 page = BufferGetPage(buffer);
195
196 if (!BloomPageIsMeta(page))
197 elog(ERROR, "Relation is not a bloom index");
198 meta = BloomPageGetMeta(BufferGetPage(buffer));
199
201 elog(ERROR, "Relation is not a bloom index");
202
203 *opts = meta->opts;
204
205 UnlockReleaseBuffer(buffer);
206
207 index->rd_amcache = opts;
208 }
209
210 memcpy(&state->opts, index->rd_amcache, sizeof(state->opts));
211 state->sizeOfBloomTuple = BLOOMTUPLEHDRSZ +
212 sizeof(BloomSignatureWord) * state->opts.bloomLength;
213}
214
215/*
216 * Random generator copied from FreeBSD. Using own random generator here for
217 * two reasons:
218 *
219 * 1) In this case random numbers are used for on-disk storage. Usage of
220 * PostgreSQL number generator would obstruct it from all possible changes.
221 * 2) Changing seed of PostgreSQL random generator would be undesirable side
222 * effect.
223 */
224static int32 next;
225
226static int32
228{
229 /*----------
230 * Compute x = (7^5 * x) mod (2^31 - 1)
231 * without overflowing 31 bits:
232 * (2^31 - 1) = 127773 * (7^5) + 2836
233 * From "Random number generators: good ones are hard to find",
234 * Park and Miller, Communications of the ACM, vol. 31, no. 10,
235 * October 1988, p. 1195.
236 *----------
237 */
238 int32 hi,
239 lo,
240 x;
241
242 /* Must be in [1, 0x7ffffffe] range at this point. */
243 hi = next / 127773;
244 lo = next % 127773;
245 x = 16807 * lo - 2836 * hi;
246 if (x < 0)
247 x += 0x7fffffff;
248 next = x;
249 /* Transform to [0, 0x7ffffffd] range. */
250 return (x - 1);
251}
252
253static void
255{
256 next = seed;
257 /* Transform to [1, 0x7ffffffe] range. */
258 next = (next % 0x7ffffffe) + 1;
259}
260
261/*
262 * Add bits of given value to the signature.
263 */
264void
266{
267 uint32 hashVal;
268 int nBit,
269 j;
270
271 /*
272 * init generator with "column's" number to get "hashed" seed for new
273 * value. We don't want to map the same numbers from different columns
274 * into the same bits!
275 */
276 mySrand(attno);
277
278 /*
279 * Init hash sequence to map our value into bits. the same values in
280 * different columns will be mapped into different bits because of step
281 * above
282 */
283 hashVal = DatumGetInt32(FunctionCall1Coll(&state->hashFn[attno], state->collations[attno], value));
284 mySrand(hashVal ^ myRand());
285
286 for (j = 0; j < state->opts.bitSize[attno]; j++)
287 {
288 /* prevent multiple evaluation in SETBIT macro */
289 nBit = myRand() % (state->opts.bloomLength * SIGNWORDBITS);
290 SETBIT(sign, nBit);
291 }
292}
293
294/*
295 * Make bloom tuple from values.
296 */
299{
300 int i;
301 BloomTuple *res = (BloomTuple *) palloc0(state->sizeOfBloomTuple);
302
303 res->heapPtr = *iptr;
304
305 /* Blooming each column */
306 for (i = 0; i < state->nColumns; i++)
307 {
308 /* skip nulls */
309 if (isnull[i])
310 continue;
311
312 signValue(state, res->sign, values[i], i);
313 }
314
315 return res;
316}
317
318/*
319 * Add new bloom tuple to the page. Returns true if new tuple was successfully
320 * added to the page. Returns false if it doesn't fit on the page.
321 */
322bool
324{
325 BloomTuple *itup;
326 BloomPageOpaque opaque;
327 Pointer ptr;
328
329 /* We shouldn't be pointed to an invalid page */
330 Assert(!PageIsNew(page) && !BloomPageIsDeleted(page));
331
332 /* Does new tuple fit on the page? */
333 if (BloomPageGetFreeSpace(state, page) < state->sizeOfBloomTuple)
334 return false;
335
336 /* Copy new tuple to the end of page */
337 opaque = BloomPageGetOpaque(page);
338 itup = BloomPageGetTuple(state, page, opaque->maxoff + 1);
339 memcpy((Pointer) itup, (Pointer) tuple, state->sizeOfBloomTuple);
340
341 /* Adjust maxoff and pd_lower */
342 opaque->maxoff++;
343 ptr = (Pointer) BloomPageGetTuple(state, page, opaque->maxoff + 1);
344 ((PageHeader) page)->pd_lower = ptr - page;
345
346 /* Assert we didn't overrun available space */
347 Assert(((PageHeader) page)->pd_lower <= ((PageHeader) page)->pd_upper);
348
349 return true;
350}
351
352/*
353 * Allocate a new page (either by recycling, or by extending the index file)
354 * The returned buffer is already pinned and exclusive-locked
355 * Caller is responsible for initializing the page by calling BloomInitPage
356 */
357Buffer
359{
360 Buffer buffer;
361
362 /* First, try to get a page from FSM */
363 for (;;)
364 {
366
367 if (blkno == InvalidBlockNumber)
368 break;
369
370 buffer = ReadBuffer(index, blkno);
371
372 /*
373 * We have to guard against the possibility that someone else already
374 * recycled this page; the buffer may be locked if so.
375 */
376 if (ConditionalLockBuffer(buffer))
377 {
378 Page page = BufferGetPage(buffer);
379
380 if (PageIsNew(page))
381 return buffer; /* OK to use, if never initialized */
382
383 if (BloomPageIsDeleted(page))
384 return buffer; /* OK to use */
385
387 }
388
389 /* Can't use it, so release buffer and try again */
390 ReleaseBuffer(buffer);
391 }
392
393 /* Must extend the file */
396
397 return buffer;
398}
399
400/*
401 * Initialize any page of a bloom index.
402 */
403void
405{
406 BloomPageOpaque opaque;
407
408 PageInit(page, BLCKSZ, sizeof(BloomPageOpaqueData));
409
410 opaque = BloomPageGetOpaque(page);
411 opaque->flags = flags;
413}
414
415/*
416 * Fill in metapage for bloom index.
417 */
418void
420{
422 BloomMetaPageData *metadata;
423
424 /*
425 * Choose the index's options. If reloptions have been assigned, use
426 * those, otherwise create default options.
427 */
428 opts = (BloomOptions *) index->rd_options;
429 if (!opts)
431
432 /*
433 * Initialize contents of meta page, including a copy of the options,
434 * which are now frozen for the life of the index.
435 */
436 BloomInitPage(metaPage, BLOOM_META);
437 metadata = BloomPageGetMeta(metaPage);
438 memset(metadata, 0, sizeof(BloomMetaPageData));
440 metadata->opts = *opts;
441 ((PageHeader) metaPage)->pd_lower += sizeof(BloomMetaPageData);
442
443 /* If this fails, probably FreeBlockNumberArray size calc is wrong: */
444 Assert(((PageHeader) metaPage)->pd_lower <= ((PageHeader) metaPage)->pd_upper);
445}
446
447/*
448 * Initialize metapage for bloom index.
449 */
450void
452{
453 Buffer metaBuffer;
454 Page metaPage;
456
457 /*
458 * Make a new page; since it is first page it should be associated with
459 * block number 0 (BLOOM_METAPAGE_BLKNO). No need to hold the extension
460 * lock because there cannot be concurrent inserters yet.
461 */
462 metaBuffer = ReadBufferExtended(index, forknum, P_NEW, RBM_NORMAL, NULL);
465
466 /* Initialize contents of meta page */
468 metaPage = GenericXLogRegisterBuffer(state, metaBuffer,
470 BloomFillMetapage(index, metaPage);
472
473 UnlockReleaseBuffer(metaBuffer);
474}
475
476/*
477 * Parse reloptions for bloom index, producing a BloomOptions struct.
478 */
479bytea *
480bloptions(Datum reloptions, bool validate)
481{
482 BloomOptions *rdopts;
483
484 /* Parse the user-given reloptions */
485 rdopts = (BloomOptions *) build_reloptions(reloptions, validate,
487 sizeof(BloomOptions),
490
491 /* Convert signature length from # of bits to # to words, rounding up */
492 if (rdopts)
493 rdopts->bloomLength = (rdopts->bloomLength + SIGNWORDBITS - 1) / SIGNWORDBITS;
494
495 return (bytea *) rdopts;
496}
static bool validate(Port *port, const char *auth)
Definition: auth-oauth.c:638
void blcostestimate(PlannerInfo *root, IndexPath *path, double loop_count, Cost *indexStartupCost, Cost *indexTotalCost, Selectivity *indexSelectivity, double *indexCorrelation, double *indexPages)
Definition: blcost.c:22
void blbuildempty(Relation index)
Definition: blinsert.c:165
IndexBuildResult * blbuild(Relation heap, Relation index, IndexInfo *indexInfo)
Definition: blinsert.c:122
bool blinsert(Relation index, Datum *values, bool *isnull, ItemPointer ht_ctid, Relation heapRel, IndexUniqueCheck checkUnique, bool indexUnchanged, IndexInfo *indexInfo)
Definition: blinsert.c:175
uint32 BlockNumber
Definition: block.h:31
#define InvalidBlockNumber
Definition: block.h:33
#define BloomPageGetOpaque(page)
Definition: bloom.h:60
#define BLOOMTUPLEHDRSZ
Definition: bloom.h:163
#define SIGNWORDBITS
Definition: bloom.h:86
#define BloomPageGetFreeSpace(state, page)
Definition: bloom.h:149
bool blvalidate(Oid opclassoid)
Definition: blvalidate.c:30
#define BLOOM_PAGE_ID
Definition: bloom.h:57
int64 blgetbitmap(IndexScanDesc scan, TIDBitmap *tbm)
Definition: blscan.c:75
#define BloomPageGetMeta(page)
Definition: bloom.h:133
IndexScanDesc blbeginscan(Relation r, int nkeys, int norderbys)
Definition: blscan.c:25
#define DEFAULT_BLOOM_BITS
Definition: bloom.h:97
#define BLOOM_HASH_PROC
Definition: bloom.h:24
struct BloomMetaPageData BloomMetaPageData
#define BLOOM_MAGICK_NUMBER
Definition: bloom.h:128
IndexBulkDeleteResult * blbulkdelete(IndexVacuumInfo *info, IndexBulkDeleteResult *stats, IndexBulkDeleteCallback callback, void *callback_state)
Definition: blvacuum.c:30
#define BLOOM_NPROC
Definition: bloom.h:26
#define BloomPageGetTuple(state, page, offset)
Definition: bloom.h:71
#define BLOOM_NSTRATEGIES
Definition: bloom.h:30
IndexBulkDeleteResult * blvacuumcleanup(IndexVacuumInfo *info, IndexBulkDeleteResult *stats)
Definition: blvacuum.c:165
#define BLOOM_OPTIONS_PROC
Definition: bloom.h:25
uint16 BloomSignatureWord
Definition: bloom.h:84
#define BloomPageIsDeleted(page)
Definition: bloom.h:64
#define DEFAULT_BLOOM_LENGTH
Definition: bloom.h:91
#define BLOOM_META
Definition: bloom.h:46
#define MAX_BLOOM_BITS
Definition: bloom.h:98
void blendscan(IndexScanDesc scan)
Definition: blscan.c:62
#define MAX_BLOOM_LENGTH
Definition: bloom.h:92
#define BLOOM_METAPAGE_BLKNO
Definition: bloom.h:78
#define BloomPageIsMeta(page)
Definition: bloom.h:62
void blrescan(IndexScanDesc scan, ScanKey scankey, int nscankeys, ScanKey orderbys, int norderbys)
Definition: blscan.c:45
static int32 next
Definition: blutils.c:224
static int32 myRand(void)
Definition: blutils.c:227
void BloomInitPage(Page page, uint16 flags)
Definition: blutils.c:404
void _PG_init(void)
Definition: blutils.c:49
Datum blhandler(PG_FUNCTION_ARGS)
Definition: blutils.c:103
BloomTuple * BloomFormTuple(BloomState *state, ItemPointer iptr, Datum *values, bool *isnull)
Definition: blutils.c:298
PG_FUNCTION_INFO_V1(blhandler)
static BloomOptions * makeDefaultBloomOptions(void)
Definition: blutils.c:84
bool BloomPageAddItem(BloomState *state, Page page, BloomTuple *tuple)
Definition: blutils.c:323
static relopt_kind bl_relopt_kind
Definition: blutils.c:35
Buffer BloomNewBuffer(Relation index)
Definition: blutils.c:358
void BloomFillMetapage(Relation index, Page metaPage)
Definition: blutils.c:419
void BloomInitMetapage(Relation index, ForkNumber forknum)
Definition: blutils.c:451
bytea * bloptions(Datum reloptions, bool validate)
Definition: blutils.c:480
#define SETBIT(x, i)
Definition: blutils.c:29
void signValue(BloomState *state, BloomSignatureWord *sign, Datum value, int attno)
Definition: blutils.c:265
static void mySrand(uint32 seed)
Definition: blutils.c:254
void initBloomState(BloomState *state, Relation index)
Definition: blutils.c:166
static relopt_parse_elt bl_relopt_tab[INDEX_MAX_KEYS+1]
Definition: blutils.c:38
static Datum values[MAXATTR]
Definition: bootstrap.c:151
int Buffer
Definition: buf.h:23
BlockNumber BufferGetBlockNumber(Buffer buffer)
Definition: bufmgr.c:4161
Buffer ExtendBufferedRel(BufferManagerRelation bmr, ForkNumber forkNum, BufferAccessStrategy strategy, uint32 flags)
Definition: bufmgr.c:851
bool ConditionalLockBuffer(Buffer buffer)
Definition: bufmgr.c:5563
void ReleaseBuffer(Buffer buffer)
Definition: bufmgr.c:5303
void UnlockReleaseBuffer(Buffer buffer)
Definition: bufmgr.c:5320
void LockBuffer(Buffer buffer, int mode)
Definition: bufmgr.c:5537
Buffer ReadBufferExtended(Relation reln, ForkNumber forkNum, BlockNumber blockNum, ReadBufferMode mode, BufferAccessStrategy strategy)
Definition: bufmgr.c:798
Buffer ReadBuffer(Relation reln, BlockNumber blockNum)
Definition: bufmgr.c:751
#define BUFFER_LOCK_UNLOCK
Definition: bufmgr.h:196
#define BUFFER_LOCK_SHARE
Definition: bufmgr.h:197
#define P_NEW
Definition: bufmgr.h:191
static Page BufferGetPage(Buffer buffer)
Definition: bufmgr.h:414
@ EB_LOCK_FIRST
Definition: bufmgr.h:87
#define BUFFER_LOCK_EXCLUSIVE
Definition: bufmgr.h:198
@ RBM_NORMAL
Definition: bufmgr.h:46
#define BMR_REL(p_rel)
Definition: bufmgr.h:108
void PageInit(Page page, Size pageSize, Size specialSize)
Definition: bufpage.c:42
PageHeaderData * PageHeader
Definition: bufpage.h:174
static bool PageIsNew(const PageData *page)
Definition: bufpage.h:234
PageData * Page
Definition: bufpage.h:82
char * Pointer
Definition: c.h:493
int32_t int32
Definition: c.h:498
uint16_t uint16
Definition: c.h:501
uint32_t uint32
Definition: c.h:502
#define lengthof(array)
Definition: c.h:759
#define ERROR
Definition: elog.h:39
#define elog(elevel,...)
Definition: elog.h:226
Datum FunctionCall1Coll(FmgrInfo *flinfo, Oid collation, Datum arg1)
Definition: fmgr.c:1129
void fmgr_info_copy(FmgrInfo *dstinfo, FmgrInfo *srcinfo, MemoryContext destcxt)
Definition: fmgr.c:580
#define PG_RETURN_POINTER(x)
Definition: fmgr.h:361
#define PG_FUNCTION_ARGS
Definition: fmgr.h:193
Page GenericXLogRegisterBuffer(GenericXLogState *state, Buffer buffer, int flags)
Definition: generic_xlog.c:299
GenericXLogState * GenericXLogStart(Relation relation)
Definition: generic_xlog.c:269
XLogRecPtr GenericXLogFinish(GenericXLogState *state)
Definition: generic_xlog.c:337
#define GENERIC_XLOG_FULL_IMAGE
Definition: generic_xlog.h:26
Assert(PointerIsAligned(start, uint64))
FmgrInfo * index_getprocinfo(Relation irel, AttrNumber attnum, uint16 procnum)
Definition: indexam.c:907
BlockNumber GetFreeIndexPage(Relation rel)
Definition: indexfsm.c:38
static struct @165 value
char sign
Definition: informix.c:693
int x
Definition: isn.c:75
int j
Definition: isn.c:78
int i
Definition: isn.c:77
if(TABLE==NULL||TABLE_index==NULL)
Definition: isn.c:81
#define AccessExclusiveLock
Definition: lockdefs.h:43
char * MemoryContextStrdup(MemoryContext context, const char *string)
Definition: mcxt.c:2309
void * MemoryContextAlloc(MemoryContext context, Size size)
Definition: mcxt.c:1256
void * palloc0(Size size)
Definition: mcxt.c:1970
MemoryContext TopMemoryContext
Definition: mcxt.c:165
MemoryContext CurrentMemoryContext
Definition: mcxt.c:159
#define makeNode(_type_)
Definition: nodes.h:161
static AmcheckOptions opts
Definition: pg_amcheck.c:112
#define INDEX_MAX_KEYS
static char * buf
Definition: pg_test_fsync.c:72
#define snprintf
Definition: port.h:239
uintptr_t Datum
Definition: postgres.h:69
static int32 DatumGetInt32(Datum X)
Definition: postgres.h:207
#define InvalidOid
Definition: postgres_ext.h:35
void add_int_reloption(bits32 kinds, const char *name, const char *desc, int default_val, int min_val, int max_val, LOCKMODE lockmode)
Definition: reloptions.c:912
void * build_reloptions(Datum reloptions, bool validate, relopt_kind kind, Size relopt_struct_size, const relopt_parse_elt *relopt_elems, int num_relopt_elems)
Definition: reloptions.c:1934
relopt_kind add_reloption_kind(void)
Definition: reloptions.c:694
relopt_kind
Definition: reloptions.h:40
@ RELOPT_TYPE_INT
Definition: reloptions.h:32
ForkNumber
Definition: relpath.h:56
@ MAIN_FORKNUM
Definition: relpath.h:58
BloomOptions opts
Definition: bloom.h:123
uint32 magickNumber
Definition: bloom.h:120
int bloomLength
Definition: bloom.h:104
OffsetNumber maxoff
Definition: bloom.h:35
uint16 flags
Definition: bloom.h:36
uint16 bloom_page_id
Definition: bloom.h:40
BloomSignatureWord sign[FLEXIBLE_ARRAY_MEMBER]
Definition: bloom.h:160
ItemPointerData heapPtr
Definition: bloom.h:159
ambuildphasename_function ambuildphasename
Definition: amapi.h:304
ambuildempty_function ambuildempty
Definition: amapi.h:294
amvacuumcleanup_function amvacuumcleanup
Definition: amapi.h:298
bool amclusterable
Definition: amapi.h:268
amoptions_function amoptions
Definition: amapi.h:302
amestimateparallelscan_function amestimateparallelscan
Definition: amapi.h:316
amrestrpos_function amrestrpos
Definition: amapi.h:313
aminsert_function aminsert
Definition: amapi.h:295
amendscan_function amendscan
Definition: amapi.h:311
amtranslate_strategy_function amtranslatestrategy
Definition: amapi.h:321
uint16 amoptsprocnum
Definition: amapi.h:242
amparallelrescan_function amparallelrescan
Definition: amapi.h:318
Oid amkeytype
Definition: amapi.h:284
bool amconsistentordering
Definition: amapi.h:252
bool ampredlocks
Definition: amapi.h:270
uint16 amsupport
Definition: amapi.h:240
amtranslate_cmptype_function amtranslatecmptype
Definition: amapi.h:322
amcostestimate_function amcostestimate
Definition: amapi.h:300
bool amcanorderbyop
Definition: amapi.h:246
amadjustmembers_function amadjustmembers
Definition: amapi.h:306
ambuild_function ambuild
Definition: amapi.h:293
bool amstorage
Definition: amapi.h:266
uint16 amstrategies
Definition: amapi.h:238
bool amoptionalkey
Definition: amapi.h:260
amgettuple_function amgettuple
Definition: amapi.h:309
amcanreturn_function amcanreturn
Definition: amapi.h:299
bool amcanunique
Definition: amapi.h:256
amgetbitmap_function amgetbitmap
Definition: amapi.h:310
amproperty_function amproperty
Definition: amapi.h:303
ambulkdelete_function ambulkdelete
Definition: amapi.h:297
bool amsearcharray
Definition: amapi.h:262
amvalidate_function amvalidate
Definition: amapi.h:305
ammarkpos_function ammarkpos
Definition: amapi.h:312
bool amcanmulticol
Definition: amapi.h:258
bool amusemaintenanceworkmem
Definition: amapi.h:278
ambeginscan_function ambeginscan
Definition: amapi.h:307
bool amcanparallel
Definition: amapi.h:272
amrescan_function amrescan
Definition: amapi.h:308
bool amcanorder
Definition: amapi.h:244
bool amcanbuildparallel
Definition: amapi.h:274
aminitparallelscan_function aminitparallelscan
Definition: amapi.h:317
uint8 amparallelvacuumoptions
Definition: amapi.h:282
aminsertcleanup_function aminsertcleanup
Definition: amapi.h:296
bool amcanbackward
Definition: amapi.h:254
amgettreeheight_function amgettreeheight
Definition: amapi.h:301
bool amcaninclude
Definition: amapi.h:276
bool amsearchnulls
Definition: amapi.h:264
bool amconsistentequality
Definition: amapi.h:250
bool amcanhash
Definition: amapi.h:248
Definition: type.h:96
const char * optname
Definition: reloptions.h:152
relopt_type opttype
Definition: reloptions.h:153
Definition: regguts.h:323
Definition: c.h:658
#define VACUUM_OPTION_PARALLEL_CLEANUP
Definition: vacuum.h:63
#define VACUUM_OPTION_PARALLEL_BULKDEL
Definition: vacuum.h:48
#define SET_VARSIZE(PTR, len)
Definition: varatt.h:305