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/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 |
#define NCOLUMNS 9 |
typedef void(* pgstat_page) (pgstattuple_type *, Relation, BlockNumber, BufferAccessStrategy) |
Definition at line 64 of file pgstattuple.c.
typedef struct pgstattuple_type pgstattuple_type |
|
static |
Definition at line 89 of file pgstattuple.c.
References BuildTupleFromCStrings(), elog, ERROR, get_call_result_type(), HeapTupleGetDatum(), i, INT64_FORMAT, NCHARS, NCOLUMNS, snprintf, 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 408 of file pgstattuple.c.
References _bt_relbuf(), BT_READ, BTPageGetOpaque, buf, BufferGetPage(), LockBuffer(), MAIN_FORKNUM, P_FIRSTDATAKEY, P_IGNORE, P_ISLEAF, PageGetMaxOffsetNumber(), PageIsNew(), pgstat_index_page(), RBM_NORMAL, and ReadBufferExtended().
Referenced by pgstat_relation().
|
static |
Definition at line 494 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 452 of file pgstattuple.c.
References _hash_getbuf_with_strategy(), _hash_relbuf(), buf, BufferGetPage(), FirstOffsetNumber, HASH_READ, HashPageOpaqueData::hasho_flag, HashPageGetOpaque, LH_BITMAP_PAGE, LH_BUCKET_PAGE, LH_META_PAGE, LH_OVERFLOW_PAGE, LH_PAGE_TYPE, LH_UNUSED_PAGE, MAXALIGN, PageGetMaxOffsetNumber(), PageGetSpecialSize(), and pgstat_index_page().
Referenced by pgstat_relation().
|
static |
Definition at line 313 of file pgstattuple.c.
References AccessShareLock, BUFFER_LOCK_SHARE, BUFFER_LOCK_UNLOCK, BufferGetPage(), build_pgstattuple_type(), CHECK_FOR_INTERRUPTS, ereport, errcode(), errmsg(), ERROR, ForwardScanDirection, heap_getnext(), HeapTupleSatisfiesVisibility(), InitDirtySnapshot, ItemPointerGetBlockNumber(), LockBuffer(), MAIN_FORKNUM, PageGetExactFreeSpace(), RBM_NORMAL, RelationData::rd_rel, ReadBufferExtended(), relation_close(), HeapScanDescData::rs_cbuf, HeapScanDescData::rs_nblocks, HeapScanDescData::rs_strategy, SnapshotAny, HeapTupleData::t_len, HeapTupleData::t_self, table_beginscan_strat(), table_endscan(), and UnlockReleaseBuffer().
Referenced by pgstat_relation().
|
static |
Definition at line 522 of file pgstattuple.c.
References AccessShareLock, BAS_BULKREAD, build_pgstattuple_type(), CHECK_FOR_INTERRUPTS, ExclusiveLock, GetAccessStrategy(), LockRelationForExtension(), relation_close(), RelationGetNumberOfBlocks, start, and UnlockRelationForExtension().
Referenced by pgstat_relation().
|
static |
Definition at line 566 of file pgstattuple.c.
References i, ItemIdGetLength, ItemIdIsDead, OffsetNumberNext, PageGetExactFreeSpace(), and PageGetItemId().
Referenced by pgstat_btree_page(), pgstat_gist_page(), and pgstat_hash_page().
|
static |
Definition at line 240 of file pgstattuple.c.
References BTREE_METAPAGE, ereport, err(), errcode(), errdetail_relkind_not_supported(), errmsg(), ERROR, GIST_ROOT_BLKNO, HASH_METAPAGE, pgstat_btree_page(), pgstat_gist_page(), pgstat_hash_page(), pgstat_heap(), pgstat_index(), RelationData::rd_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 166 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 192 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 207 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 225 of file pgstattuple.c.
References AccessShareLock, PG_GETARG_OID, PG_RETURN_DATUM, pgstat_relation(), and relation_open().
PG_MODULE_MAGIC |
Definition at line 41 of file pgstattuple.c.