|
PostgreSQL Source Code git master
|
#include "postgres.h"#include "access/htup_details.h"#include "access/nbtree.h"#include "access/relation.h"#include "catalog/namespace.h"#include "catalog/pg_am.h"#include "catalog/pg_type.h"#include "funcapi.h"#include "miscadmin.h"#include "pageinspect.h"#include "utils/array.h"#include "utils/builtins.h"#include "utils/rel.h"#include "utils/varlena.h"
Go to the source code of this file.
Data Structures | |
| struct | BTPageStat |
| struct | ua_page_stats |
| struct | ua_page_items |
Macros | |
| #define | IS_INDEX(r) ((r)->rd_rel->relkind == RELKIND_INDEX) |
| #define | IS_BTREE(r) ((r)->rd_rel->relam == BTREE_AM_OID) |
| #define | BT_METAP_COLS_V1_8 9 |
Typedefs | |
| typedef struct BTPageStat | BTPageStat |
| typedef struct ua_page_stats | ua_page_stats |
| typedef struct ua_page_items | ua_page_items |
| #define BT_METAP_COLS_V1_8 9 |
Definition at line 828 of file btreefuncs.c.
| #define IS_BTREE | ( | r | ) | ((r)->rd_rel->relam == BTREE_AM_OID) |
Definition at line 53 of file btreefuncs.c.
| #define IS_INDEX | ( | r | ) | ((r)->rd_rel->relkind == RELKIND_INDEX) |
Definition at line 52 of file btreefuncs.c.
Definition at line 226 of file btreefuncs.c.
References check_relation_block_range(), ereport, errcode(), errmsg(), ERROR, fb(), IS_BTREE, IS_INDEX, RELATION_IS_OTHER_TEMP, and RelationGetRelationName.
Referenced by bt_multi_page_stats(), bt_page_items_internal(), and bt_page_stats_internal().
| Datum bt_metap | ( | PG_FUNCTION_ARGS | ) |
Definition at line 839 of file btreefuncs.c.
References AccessShareLock, BT_METAP_COLS_V1_8, BTPageGetMeta, BTREE_NOVAC_VERSION, BUFFER_LOCK_SHARE, BufferGetPage(), BuildTupleFromCStrings(), elog, ereport, errcode(), errhint(), errmsg(), ERROR, fb(), get_call_result_type(), HeapTupleGetDatum(), IS_BTREE, IS_INDEX, j, LockBuffer(), makeRangeVarFromNameList(), PG_GETARG_TEXT_PP, PG_RETURN_DATUM, psprintf(), ReadBuffer(), relation_close(), RELATION_IS_OTHER_TEMP, relation_openrv(), RelationGetRelationName, relname, superuser(), textToQualifiedNameList(), TupleDescGetAttInMetadata(), TYPEFUNC_COMPOSITE, UnlockReleaseBuffer(), and values.
| Datum bt_multi_page_stats | ( | PG_FUNCTION_ARGS | ) |
Definition at line 344 of file btreefuncs.c.
References AccessShareLock, bt_index_block_validate(), BUFFER_LOCK_SHARE, BuildTupleFromCStrings(), check_relation_block_range(), elog, ereport, errcode(), errmsg(), ERROR, fb(), get_call_result_type(), GetBTPageStatistics(), HeapTupleGetDatum(), InvalidBlockNumber, j, LockBuffer(), makeRangeVarFromNameList(), MemoryContextSwitchTo(), NoLock, palloc_object, PG_GETARG_INT64, PG_GETARG_TEXT_PP, psprintf(), ReadBuffer(), relation_close(), relation_open(), relation_openrv(), RelationGetNumberOfBlocks, RelationGetRelid, relname, SRF_FIRSTCALL_INIT, SRF_IS_FIRSTCALL, SRF_PERCALL_SETUP, SRF_RETURN_DONE, SRF_RETURN_NEXT, stat, superuser(), textToQualifiedNameList(), TupleDescGetAttInMetadata(), TYPEFUNC_COMPOSITE, UnlockReleaseBuffer(), and values.
| Datum bt_page_items | ( | PG_FUNCTION_ARGS | ) |
Definition at line 719 of file btreefuncs.c.
References bt_page_items_internal(), and PAGEINSPECT_V1_8.
| Datum bt_page_items_1_9 | ( | PG_FUNCTION_ARGS | ) |
Definition at line 712 of file btreefuncs.c.
References bt_page_items_internal(), and PAGEINSPECT_V1_9.
| Datum bt_page_items_bytea | ( | PG_FUNCTION_ARGS | ) |
Definition at line 734 of file btreefuncs.c.
References BlessTupleDesc(), bt_page_print_tuples(), BTPageGetOpaque, BTPageOpaqueData::btpo_level, elog, ereport, errcode(), errdetail(), errmsg(), ERROR, fb(), FirstOffsetNumber, get_call_result_type(), get_page_from_raw(), MAXALIGN, MemoryContextSwitchTo(), NOTICE, P_ISDELETED, P_ISLEAF, P_ISMETA, P_RIGHTMOST, PageGetMaxOffsetNumber(), PageGetSpecialSize(), PageIsNew(), palloc_object, PG_GETARG_BYTEA_P, PG_RETURN_NULL, SRF_FIRSTCALL_INIT, SRF_IS_FIRSTCALL, SRF_PERCALL_SETUP, SRF_RETURN_DONE, SRF_RETURN_NEXT, superuser(), and TYPEFUNC_COMPOSITE.
|
static |
Definition at line 624 of file btreefuncs.c.
References AccessShareLock, BlessTupleDesc(), bt_index_block_validate(), bt_page_print_tuples(), BTPageGetOpaque, BUFFER_LOCK_SHARE, BufferGetPage(), elog, ereport, errcode(), errmsg(), ERROR, fb(), FirstOffsetNumber, get_call_result_type(), INT64_FORMAT, LockBuffer(), makeRangeVarFromNameList(), MemoryContextSwitchTo(), NOTICE, P_ISDELETED, P_ISLEAF, P_RIGHTMOST, PageGetMaxOffsetNumber(), PAGEINSPECT_V1_8, palloc(), palloc_object, PG_GETARG_INT64, PG_GETARG_TEXT_PP, PG_GETARG_UINT32, ReadBuffer(), relation_close(), relation_openrv(), relname, SRF_FIRSTCALL_INIT, SRF_IS_FIRSTCALL, SRF_PERCALL_SETUP, SRF_RETURN_DONE, SRF_RETURN_NEXT, superuser(), textToQualifiedNameList(), TYPEFUNC_COMPOSITE, and UnlockReleaseBuffer().
Referenced by bt_page_items(), and bt_page_items_1_9().
|
static |
Definition at line 481 of file btreefuncs.c.
References Assert, BoolGetDatum(), BTreeTupleGetHeapTID(), BTreeTupleGetNPosting(), BTreeTupleGetPosting(), BTreeTupleGetPostingOffset(), BTreeTupleIsPivot(), BTreeTupleIsPosting(), construct_array_builtin(), CStringGetTextDatum, elog, ERROR, fb(), heap_form_tuple(), HeapTupleGetDatum(), i, INDEX_SIZE_MASK, IndexInfoFindDataOffset(), IndexTupleHasNulls(), IndexTupleHasVarwidths(), IndexTupleSize(), Int32GetDatum(), ItemIdIsDead, ItemIdIsValid, ItemPointerGetDatum(), j, MAXALIGN, P_HIKEY, PageGetItem(), PageGetItemId(), palloc(), palloc0(), pfree(), PointerGetDatum(), sprintf, IndexTupleData::t_info, IndexTupleData::t_tid, UInt16GetDatum(), and values.
Referenced by bt_page_items_bytea(), and bt_page_items_internal().
| Datum bt_page_stats | ( | PG_FUNCTION_ARGS | ) |
Definition at line 329 of file btreefuncs.c.
References bt_page_stats_internal(), and PAGEINSPECT_V1_8.
| Datum bt_page_stats_1_9 | ( | PG_FUNCTION_ARGS | ) |
Definition at line 322 of file btreefuncs.c.
References bt_page_stats_internal(), and PAGEINSPECT_V1_9.
|
static |
Definition at line 260 of file btreefuncs.c.
References AccessShareLock, bt_index_block_validate(), BUFFER_LOCK_SHARE, BuildTupleFromCStrings(), elog, ereport, errcode(), errmsg(), ERROR, fb(), get_call_result_type(), GetBTPageStatistics(), HeapTupleGetDatum(), InvalidBlockNumber, j, LockBuffer(), makeRangeVarFromNameList(), PAGEINSPECT_V1_8, PG_GETARG_INT64, PG_GETARG_TEXT_PP, PG_GETARG_UINT32, PG_RETURN_DATUM, psprintf(), ReadBuffer(), relation_close(), relation_openrv(), relname, stat, superuser(), textToQualifiedNameList(), TupleDescGetAttInMetadata(), TYPEFUNC_COMPOSITE, UnlockReleaseBuffer(), and values.
Referenced by bt_page_stats(), and bt_page_stats_1_9().
Definition at line 204 of file btreefuncs.c.
References ereport, errcode(), errmsg(), ERROR, fb(), MaxBlockNumber, and RelationGetNumberOfBlocks.
Referenced by bt_index_block_validate(), and bt_multi_page_stats().
|
static |
Definition at line 109 of file btreefuncs.c.
References BTPageGetDeleteXid(), BTPageGetOpaque, BTPageOpaqueData::btpo_cycleid, BTPageOpaqueData::btpo_flags, BTPageOpaqueData::btpo_level, BTPageOpaqueData::btpo_next, BTPageOpaqueData::btpo_prev, BufferGetPage(), DEBUG2, elog, EpochFromFullTransactionId, fb(), FirstOffsetNumber, IndexTupleSize(), InvalidOffsetNumber, ItemIdIsDead, P_HAS_FULLXID, P_IGNORE, P_ISDELETED, P_ISLEAF, P_ISROOT, PageGetFreeSpace(), PageGetItem(), PageGetItemId(), PageGetMaxOffsetNumber(), PageGetPageSize(), PageHeaderData::pd_special, SizeOfPageHeaderData, and XidFromFullTransactionId.
Referenced by bt_multi_page_stats(), and bt_page_stats_internal().
| PG_FUNCTION_INFO_V1 | ( | bt_metap | ) |
| PG_FUNCTION_INFO_V1 | ( | bt_multi_page_stats | ) |
| PG_FUNCTION_INFO_V1 | ( | bt_page_items | ) |
| PG_FUNCTION_INFO_V1 | ( | bt_page_items_1_9 | ) |
| PG_FUNCTION_INFO_V1 | ( | bt_page_items_bytea | ) |
| PG_FUNCTION_INFO_V1 | ( | bt_page_stats | ) |
| PG_FUNCTION_INFO_V1 | ( | bt_page_stats_1_9 | ) |