PostgreSQL Source Code
git master
|
#include "postgres.h"
#include "access/gist_private.h"
#include "access/hash.h"
#include "access/heapam.h"
#include "access/nbtree.h"
#include "access/relscan.h"
#include "access/tableam.h"
#include "catalog/namespace.h"
#include "catalog/pg_am_d.h"
#include "funcapi.h"
#include "miscadmin.h"
#include "storage/bufmgr.h"
#include "storage/lmgr.h"
#include "utils/builtins.h"
#include "utils/varlena.h"
Go to the source code of this file.
Data Structures | |
struct | pgstattuple_type |
Macros | |
#define | NCOLUMNS 9 |
#define | NCHARS 314 |
Typedefs | |
typedef struct pgstattuple_type | pgstattuple_type |
typedef void(* | pgstat_page) (pgstattuple_type *, Relation, BlockNumber, BufferAccessStrategy) |
Variables | |
PG_MODULE_MAGIC | |
#define NCHARS 314 |
Referenced by build_pgstattuple_type().
#define NCOLUMNS 9 |
Referenced by build_pgstattuple_type().
typedef void(* pgstat_page) (pgstattuple_type *, Relation, BlockNumber, BufferAccessStrategy) |
Definition at line 65 of file pgstattuple.c.
typedef struct pgstattuple_type pgstattuple_type |
|
static |
Definition at line 90 of file pgstattuple.c.
References BuildTupleFromCStrings(), pgstattuple_type::dead_tuple_count, pgstattuple_type::dead_tuple_len, elog, ERROR, pgstattuple_type::free_space, get_call_result_type(), HeapTupleGetDatum, i, INT64_FORMAT, NCHARS, NCOLUMNS, snprintf, pgstattuple_type::table_len, pgstattuple_type::tuple_count, pgstattuple_type::tuple_len, TupleDescGetAttInMetadata(), TYPEFUNC_COMPOSITE, and values.
Referenced by pgstat_heap(), and pgstat_index().
PG_FUNCTION_INFO_V1 | ( | pgstattuple | ) |
PG_FUNCTION_INFO_V1 | ( | pgstattuple_v1_5 | ) |
PG_FUNCTION_INFO_V1 | ( | pgstattuplebyid | ) |
PG_FUNCTION_INFO_V1 | ( | pgstattuplebyid_v1_5 | ) |
|
static |
Definition at line 410 of file pgstattuple.c.
References _bt_relbuf(), BT_READ, buf, BufferGetPage, pgstattuple_type::free_space, LockBuffer(), MAIN_FORKNUM, P_FIRSTDATAKEY, P_IGNORE, P_ISLEAF, PageGetMaxOffsetNumber, PageGetSpecialPointer, PageIsNew, pgstat_index_page(), RBM_NORMAL, and ReadBufferExtended().
Referenced by pgstat_relation().
|
static |
Definition at line 496 of file pgstattuple.c.
References buf, BufferGetPage, FirstOffsetNumber, GIST_SHARE, gistcheckpage(), GistPageIsLeaf, LockBuffer(), MAIN_FORKNUM, PageGetMaxOffsetNumber, pgstat_index_page(), RBM_NORMAL, ReadBufferExtended(), and UnlockReleaseBuffer().
Referenced by pgstat_relation().
|
static |
Definition at line 454 of file pgstattuple.c.
References _hash_getbuf_with_strategy(), _hash_relbuf(), buf, BufferGetPage, FirstOffsetNumber, pgstattuple_type::free_space, HASH_READ, HashPageOpaqueData::hasho_flag, LH_BITMAP_PAGE, LH_BUCKET_PAGE, LH_META_PAGE, LH_OVERFLOW_PAGE, LH_PAGE_TYPE, LH_UNUSED_PAGE, MAXALIGN, PageGetMaxOffsetNumber, PageGetSpecialPointer, PageGetSpecialSize, and pgstat_index_page().
Referenced by pgstat_relation().
|
static |
Definition at line 319 of file pgstattuple.c.
References AccessShareLock, BUFFER_LOCK_SHARE, BUFFER_LOCK_UNLOCK, BufferGetPage, build_pgstattuple_type(), CHECK_FOR_INTERRUPTS, pgstattuple_type::dead_tuple_count, pgstattuple_type::dead_tuple_len, ereport, errcode(), errmsg(), ERROR, ForwardScanDirection, pgstattuple_type::free_space, heap_getnext(), HeapTupleSatisfiesVisibility(), InitDirtySnapshot, ItemPointerGetBlockNumber, LockBuffer(), MAIN_FORKNUM, PageGetHeapFreeSpace(), RBM_NORMAL, RelationData::rd_rel, ReadBufferExtended(), relation_close(), HeapScanDescData::rs_cbuf, HeapScanDescData::rs_nblocks, HeapScanDescData::rs_strategy, SnapshotAny, stat, HeapTupleData::t_len, HeapTupleData::t_self, table_beginscan_strat(), table_endscan(), pgstattuple_type::table_len, pgstattuple_type::tuple_count, pgstattuple_type::tuple_len, and UnlockReleaseBuffer().
Referenced by pgstat_relation().
|
static |
Definition at line 524 of file pgstattuple.c.
References AccessShareLock, BAS_BULKREAD, build_pgstattuple_type(), CHECK_FOR_INTERRUPTS, ExclusiveLock, GetAccessStrategy(), LockRelationForExtension(), relation_close(), RelationGetNumberOfBlocks, stat, pgstattuple_type::table_len, and UnlockRelationForExtension().
Referenced by pgstat_relation().
|
static |
Definition at line 568 of file pgstattuple.c.
References pgstattuple_type::dead_tuple_count, pgstattuple_type::dead_tuple_len, pgstattuple_type::free_space, i, ItemIdGetLength, ItemIdIsDead, OffsetNumberNext, PageGetFreeSpace(), PageGetItemId, pgstattuple_type::tuple_count, and pgstattuple_type::tuple_len.
Referenced by pgstat_btree_page(), pgstat_gist_page(), and pgstat_hash_page().
|
static |
Definition at line 241 of file pgstattuple.c.
References BTREE_METAPAGE, ereport, errcode(), errmsg(), ERROR, GIST_ROOT_BLKNO, HASH_METAPAGE, pgstat_btree_page(), pgstat_gist_page(), pgstat_hash_page(), pgstat_heap(), pgstat_index(), RelationData::rd_rel, RELATION_IS_OTHER_TEMP, and RelationGetRelationName.
Referenced by pgstattuple(), pgstattuple_v1_5(), pgstattuplebyid(), and pgstattuplebyid_v1_5().
Datum pgstattuple | ( | PG_FUNCTION_ARGS | ) |
Definition at line 167 of file pgstattuple.c.
References AccessShareLock, ereport, errcode(), errmsg(), ERROR, makeRangeVarFromNameList(), PG_GETARG_TEXT_PP, PG_RETURN_DATUM, pgstat_relation(), relation_openrv(), relname, superuser(), and textToQualifiedNameList().
Datum pgstattuple_v1_5 | ( | PG_FUNCTION_ARGS | ) |
Definition at line 193 of file pgstattuple.c.
References AccessShareLock, makeRangeVarFromNameList(), PG_GETARG_TEXT_PP, PG_RETURN_DATUM, pgstat_relation(), relation_openrv(), relname, and textToQualifiedNameList().
Datum pgstattuplebyid | ( | PG_FUNCTION_ARGS | ) |
Definition at line 208 of file pgstattuple.c.
References AccessShareLock, ereport, errcode(), errmsg(), ERROR, PG_GETARG_OID, PG_RETURN_DATUM, pgstat_relation(), relation_open(), and superuser().
Datum pgstattuplebyid_v1_5 | ( | PG_FUNCTION_ARGS | ) |
Definition at line 226 of file pgstattuple.c.
References AccessShareLock, PG_GETARG_OID, PG_RETURN_DATUM, pgstat_relation(), and relation_open().
PG_MODULE_MAGIC |
Definition at line 42 of file pgstattuple.c.