PostgreSQL Source Code
git master
|
#include "postgres.h"
#include "access/heapam.h"
#include "access/htup_details.h"
#include "access/multixact.h"
#include "access/relation.h"
#include "access/transam.h"
#include "access/visibilitymap.h"
#include "access/xact.h"
#include "catalog/namespace.h"
#include "catalog/pg_am_d.h"
#include "commands/vacuum.h"
#include "funcapi.h"
#include "miscadmin.h"
#include "storage/bufmgr.h"
#include "storage/freespace.h"
#include "storage/lmgr.h"
#include "storage/procarray.h"
#include "utils/builtins.h"
Go to the source code of this file.
Data Structures | |
struct | output_type |
Macros | |
#define | NUM_OUTPUT_COLUMNS 10 |
Typedefs | |
typedef struct output_type | output_type |
Functions | |
PG_FUNCTION_INFO_V1 (pgstattuple_approx) | |
PG_FUNCTION_INFO_V1 (pgstattuple_approx_v1_5) | |
Datum | pgstattuple_approx_internal (Oid relid, FunctionCallInfo fcinfo) |
static void | statapprox_heap (Relation rel, output_type *stat) |
Datum | pgstattuple_approx (PG_FUNCTION_ARGS) |
Datum | pgstattuple_approx_v1_5 (PG_FUNCTION_ARGS) |
#define NUM_OUTPUT_COLUMNS 10 |
Definition at line 52 of file pgstatapprox.c.
Referenced by pgstattuple_approx_internal().
typedef struct output_type output_type |
PG_FUNCTION_INFO_V1 | ( | pgstattuple_approx | ) |
PG_FUNCTION_INFO_V1 | ( | pgstattuple_approx_v1_5 | ) |
Datum pgstattuple_approx | ( | PG_FUNCTION_ARGS | ) |
Definition at line 227 of file pgstatapprox.c.
References ereport, errcode(), errmsg(), ERROR, PG_GETARG_OID, PG_RETURN_DATUM, pgstattuple_approx_internal(), and superuser().
Datum pgstattuple_approx_internal | ( | Oid | relid, |
FunctionCallInfo | fcinfo | ||
) |
Definition at line 255 of file pgstatapprox.c.
References AccessShareLock, output_type::dead_tuple_count, output_type::dead_tuple_len, output_type::dead_tuple_percent, elog, ereport, errcode(), errmsg(), ERROR, Float8GetDatum(), output_type::free_percent, output_type::free_space, get_call_result_type(), heap_form_tuple(), HeapTupleGetDatum, i, Int64GetDatum(), TupleDescData::natts, NUM_OUTPUT_COLUMNS, RelationData::rd_rel, relation_close(), RELATION_IS_OTHER_TEMP, relation_open(), RelationGetRelationName, output_type::scanned_percent, statapprox_heap(), output_type::table_len, output_type::tuple_count, output_type::tuple_len, output_type::tuple_percent, TYPEFUNC_COMPOSITE, and values.
Referenced by pgstattuple_approx(), and pgstattuple_approx_v1_5().
Datum pgstattuple_approx_v1_5 | ( | PG_FUNCTION_ARGS | ) |
Definition at line 247 of file pgstatapprox.c.
References PG_GETARG_OID, PG_RETURN_DATUM, and pgstattuple_approx_internal().
|
static |
Definition at line 65 of file pgstatapprox.c.
References Assert, BAS_BULKREAD, buf, BUFFER_LOCK_SHARE, BufferGetPage, BufferIsValid, CHECK_FOR_INTERRUPTS, output_type::dead_tuple_count, output_type::dead_tuple_len, output_type::dead_tuple_percent, elog, ERROR, FirstOffsetNumber, output_type::free_percent, output_type::free_space, GetAccessStrategy(), GetOldestNonRemovableTransactionId(), GetRecordedFreeSpace(), HEAPTUPLE_DEAD, HEAPTUPLE_DELETE_IN_PROGRESS, HEAPTUPLE_INSERT_IN_PROGRESS, HEAPTUPLE_LIVE, HEAPTUPLE_RECENTLY_DEAD, HeapTupleSatisfiesVacuum(), InvalidBuffer, ItemIdGetLength, ItemIdIsDead, ItemIdIsNormal, ItemIdIsRedirected, ItemIdIsUsed, ItemPointerSet, LockBuffer(), MAIN_FORKNUM, Max, OffsetNumberNext, PageGetHeapFreeSpace(), PageGetItem, PageGetItemId, PageGetMaxOffsetNumber, PageIsEmpty, PageIsNew, RBM_NORMAL, ReadBufferExtended(), RelationGetNumberOfBlocks, RelationGetRelid, ReleaseBuffer(), output_type::scanned_percent, SizeOfPageHeaderData, HeapTupleData::t_data, HeapTupleData::t_len, HeapTupleData::t_self, HeapTupleData::t_tableOid, output_type::table_len, output_type::tuple_count, output_type::tuple_len, output_type::tuple_percent, UnlockReleaseBuffer(), vac_estimate_reltuples(), and VM_ALL_VISIBLE.
Referenced by pgstattuple_approx_internal().