PostgreSQL Source Code
git master
|
#include "postgres.h"
#include "access/tidstore.h"
#include "fmgr.h"
#include "funcapi.h"
#include "storage/block.h"
#include "storage/itemptr.h"
#include "storage/lwlock.h"
#include "utils/array.h"
#include "utils/memutils.h"
Go to the source code of this file.
Data Structures | |
struct | ItemArray |
Typedefs | |
typedef struct ItemArray | ItemArray |
Functions | |
PG_FUNCTION_INFO_V1 (test_create) | |
PG_FUNCTION_INFO_V1 (do_set_block_offsets) | |
PG_FUNCTION_INFO_V1 (check_set_block_offsets) | |
PG_FUNCTION_INFO_V1 (test_is_full) | |
PG_FUNCTION_INFO_V1 (test_destroy) | |
static int | itemptr_cmp (const void *left, const void *right) |
Datum | test_create (PG_FUNCTION_ARGS) |
static void | sanity_check_array (ArrayType *ta) |
static void | check_tidstore_available (void) |
static void | purge_from_verification_array (BlockNumber blkno) |
Datum | do_set_block_offsets (PG_FUNCTION_ARGS) |
Datum | check_set_block_offsets (PG_FUNCTION_ARGS) |
Datum | test_is_full (PG_FUNCTION_ARGS) |
Datum | test_destroy (PG_FUNCTION_ARGS) |
Variables | |
PG_MODULE_MAGIC | |
static TidStore * | tidstore = NULL |
static size_t | tidstore_empty_size |
static ItemArray | items |
Datum check_set_block_offsets | ( | PG_FUNCTION_ARGS | ) |
Definition at line 220 of file test_tidstore.c.
References Assert, TidStoreIterResult::blkno, check_tidstore_available(), elog, ERROR, FirstOffsetNumber, i, ItemArray::insert_tids, ItemPointerGetBlockNumber(), ItemPointerGetOffsetNumber(), ItemPointerSet(), itemptr_cmp(), items, ItemArray::iter_tids, lengthof, ItemArray::lookup_tids, MaxOffsetNumber, ItemArray::num_tids, PG_RETURN_VOID, qsort, tidstore, TidStoreBeginIterate(), TidStoreEndIterate(), TidStoreGetBlockOffsets(), TidStoreIsMember(), TidStoreIterateNext(), TidStoreLockShare(), and TidStoreUnlock().
|
static |
Definition at line 150 of file test_tidstore.c.
References elog, ERROR, and tidstore.
Referenced by check_set_block_offsets(), do_set_block_offsets(), test_destroy(), and test_is_full().
Datum do_set_block_offsets | ( | PG_FUNCTION_ARGS | ) |
Definition at line 170 of file test_tidstore.c.
References ARR_DATA_PTR, ARR_DIMS, ARR_NDIM, ArrayGetNItems(), check_tidstore_available(), i, idx(), ItemArray::insert_tids, ItemPointerSet(), items, ItemArray::iter_tids, ItemArray::lookup_tids, ItemArray::max_tids, ItemArray::num_tids, PG_GETARG_ARRAYTYPE_P_COPY, PG_GETARG_INT64, PG_RETURN_INT64, purge_from_verification_array(), repalloc(), sanity_check_array(), tidstore, TidStoreLockExclusive(), TidStoreSetBlockOffsets(), and TidStoreUnlock().
|
static |
Definition at line 53 of file test_tidstore.c.
References ItemPointerGetBlockNumber(), and ItemPointerGetOffsetNumber().
Referenced by check_set_block_offsets().
PG_FUNCTION_INFO_V1 | ( | check_set_block_offsets | ) |
PG_FUNCTION_INFO_V1 | ( | do_set_block_offsets | ) |
PG_FUNCTION_INFO_V1 | ( | test_create | ) |
PG_FUNCTION_INFO_V1 | ( | test_destroy | ) |
PG_FUNCTION_INFO_V1 | ( | test_is_full | ) |
|
static |
Definition at line 157 of file test_tidstore.c.
References ItemArray::insert_tids, ItemPointerGetBlockNumber(), items, and ItemArray::num_tids.
Referenced by do_set_block_offsets().
|
static |
Definition at line 136 of file test_tidstore.c.
References ARR_HASNULL, ARR_NDIM, array_contains_nulls(), ereport, errcode(), errmsg(), and ERROR.
Referenced by do_set_block_offsets().
Datum test_create | ( | PG_FUNCTION_ARGS | ) |
Definition at line 86 of file test_tidstore.c.
References Assert, dsa_pin_mapping(), ItemArray::insert_tids, items, ItemArray::iter_tids, ItemArray::lookup_tids, LWLockNewTrancheId(), LWLockRegisterTranche(), ItemArray::max_tids, MemoryContextSwitchTo(), ItemArray::num_tids, old_ctx, palloc0(), PG_GETARG_BOOL, PG_RETURN_VOID, tidstore, tidstore_empty_size, TidStoreCreateLocal(), TidStoreCreateShared(), TidStoreGetDSA(), TidStoreMemoryUsage(), and TopMemoryContext.
Datum test_destroy | ( | PG_FUNCTION_ARGS | ) |
Definition at line 332 of file test_tidstore.c.
References check_tidstore_available(), ItemArray::insert_tids, items, ItemArray::iter_tids, ItemArray::lookup_tids, ItemArray::num_tids, pfree(), PG_RETURN_VOID, tidstore, and TidStoreDestroy().
Datum test_is_full | ( | PG_FUNCTION_ARGS | ) |
Definition at line 319 of file test_tidstore.c.
References check_tidstore_available(), PG_RETURN_BOOL, tidstore, tidstore_empty_size, and TidStoreMemoryUsage().
|
static |
Definition at line 49 of file test_tidstore.c.
Referenced by _bt_restore_page(), _bt_steppage(), add_sp_items_to_pathtarget(), addItemPointersToLeafTuple(), AlterOpFamilyAdd(), AlterOpFamilyDrop(), btreevacuumposting(), btrestrpos(), build_distinct_groups(), build_sorted_items(), buildFreshLeafTuple(), check_set_block_offsets(), cleanup_tsquery_stopwords(), collect_corrupt_items(), count_distinct_groups(), createPostingTree(), dataBeginPlaceToPageLeaf(), dataLeafPageGetUncompressed(), dependency_degree(), do_set_block_offsets(), findComments(), findSecLabels(), gin_bool_consistent(), ginEntryInsert(), ginInsertItemPointers(), ginint4_queryextract(), ginPostingListDecodeAllSegmentsToTbm(), ginRedoRecompress(), ginVacuumEntryPage(), ginVacuumItemPointers(), load_enum_cache_data(), multirange_get_bounds_offset(), ndistinct_for_combination(), order_qual_clauses(), parsePGArray(), pg_check_frozen(), pg_check_visible(), pgstat_execute_transactional_drops(), pgstat_get_transactional_drops(), plpython_to_hstore(), PLyMapping_ToJsonbValue(), purge_from_verification_array(), record_corrupt_item(), ResourceOwnerReleaseAll(), ResourceOwnerSort(), statext_mcv_build(), statext_mcv_deserialize(), statext_ndistinct_build(), statext_ndistinct_deserialize(), test_create(), test_destroy(), TopologicalSort(), wrapItemsInArray(), and write_multirange_data().
PG_MODULE_MAGIC |
Definition at line 28 of file test_tidstore.c.
|
static |
Definition at line 36 of file test_tidstore.c.
Referenced by check_set_block_offsets(), check_tidstore_available(), do_set_block_offsets(), test_create(), test_destroy(), and test_is_full().
|
static |
Definition at line 37 of file test_tidstore.c.
Referenced by test_create(), and test_is_full().