|
PostgreSQL Source Code git master
|
#include "postgres.h"#include "access/htup_details.h"#include "access/xlog.h"#include "access/xlogprefetcher.h"#include "catalog/catalog.h"#include "catalog/pg_authid.h"#include "catalog/pg_type.h"#include "common/ip.h"#include "funcapi.h"#include "miscadmin.h"#include "pgstat.h"#include "postmaster/bgworker.h"#include "replication/logicallauncher.h"#include "storage/proc.h"#include "storage/procarray.h"#include "utils/acl.h"#include "utils/builtins.h"#include "utils/timestamp.h"
Go to the source code of this file.
Typedefs | |
| typedef enum io_stat_col | io_stat_col |
Enumerations | |
| enum | io_stat_col { IO_COL_INVALID = -1 , IO_COL_BACKEND_TYPE , IO_COL_OBJECT , IO_COL_CONTEXT , IO_COL_READS , IO_COL_READ_BYTES , IO_COL_READ_TIME , IO_COL_WRITES , IO_COL_WRITE_BYTES , IO_COL_WRITE_TIME , IO_COL_WRITEBACKS , IO_COL_WRITEBACK_TIME , IO_COL_EXTENDS , IO_COL_EXTEND_BYTES , IO_COL_EXTEND_TIME , IO_COL_HITS , IO_COL_EVICTIONS , IO_COL_REUSES , IO_COL_FSYNCS , IO_COL_FSYNC_TIME , IO_COL_RESET_TIME , IO_NUM_COLUMNS } |
| #define HAS_PGSTAT_PERMISSIONS | ( | role | ) | (has_privs_of_role(GetUserId(), ROLE_PG_READ_ALL_STATS) || has_privs_of_role(GetUserId(), role)) |
Definition at line 37 of file pgstatfuncs.c.
| #define PG_STAT_GET_ACTIVITY_COLS 31 |
Definition at line 1203 of file pgstatfuncs.c.
Definition at line 1036 of file pgstatfuncs.c.
Definition at line 186 of file pgstatfuncs.c.
| #define PG_STAT_GET_PROGRESS_COLS PGSTAT_NUM_PROGRESS_PARAM + 3 |
Definition at line 109 of file pgstatfuncs.c.
Definition at line 39 of file pgstatfuncs.c.
Definition at line 137 of file pgstatfuncs.c.
| #define PG_STAT_GET_REPLICATION_SLOT_COLS 13 |
| #define PG_STAT_GET_SLRU_COLS 9 |
| #define PG_STAT_GET_SUBSCRIPTION_STATS_COLS 13 |
| #define PG_STAT_GET_SUBXACT_COLS 2 |
Definition at line 1832 of file pgstatfuncs.c.
Definition at line 1775 of file pgstatfuncs.c.
| #define PG_STAT_WAL_COLS 6 |
Definition at line 35 of file pgstatfuncs.c.
Definition at line 1333 of file pgstatfuncs.c.
| Datum pg_backend_pid | ( | PG_FUNCTION_ARGS | ) |
| Datum pg_stat_clear_snapshot | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1867 of file pgstatfuncs.c.
References PG_RETURN_VOID, and pgstat_clear_snapshot().
| Datum pg_stat_force_next_flush | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1877 of file pgstatfuncs.c.
References PG_RETURN_VOID, and pgstat_force_next_flush().
| Datum pg_stat_get_activity | ( | PG_FUNCTION_ARGS | ) |
Definition at line 352 of file pgstatfuncs.c.
References AuxiliaryPidGetProc(), B_BACKEND, B_BG_WORKER, B_WAL_SENDER, BackendPidGetProc(), BoolGetDatum(), clean_ipv6_addr(), CStringGetDatum(), CStringGetTextDatum, DirectFunctionCall1, DirectFunctionCall3, fb(), GetBackendTypeDesc(), GetBackgroundWorkerTypeByPid(), GetLeaderApplyWorkerPid(), HAS_PGSTAT_PERMISSIONS, inet_in(), InitMaterializedSRF(), Int32GetDatum(), INT64CONST, Int64GetDatum(), InvalidOid, InvalidPid, PGPROC::lockGroupLeader, numeric_in(), ObjectIdGetDatum(), pfree(), PG_ARGISNULL, PG_GETARG_INT32, pg_getnameinfo_all(), pg_memory_is_all_zeros(), PG_STAT_GET_ACTIVITY_COLS, pgstat_clip_activity(), pgstat_fetch_stat_numbackends(), pgstat_get_local_beentry_by_index(), pgstat_get_wait_event(), pgstat_get_wait_event_type(), PGPROC::pid, STATE_DISABLED, STATE_FASTPATH, STATE_IDLE, STATE_IDLEINTRANSACTION, STATE_IDLEINTRANSACTION_ABORTED, STATE_RUNNING, STATE_STARTING, STATE_UNDEFINED, TimestampTzGetDatum(), TransactionIdGetDatum(), TransactionIdIsValid, tuplestore_putvalues(), UINT32_ACCESS_ONCE, values, and PGPROC::wait_event_info.
| Datum pg_stat_get_archiver | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2064 of file pgstatfuncs.c.
References BlessTupleDesc(), CreateTemplateTupleDesc(), CStringGetTextDatum, fb(), heap_form_tuple(), HeapTupleGetDatum(), Int64GetDatum(), PG_RETURN_DATUM, pgstat_fetch_stat_archiver(), TimestampTzGetDatum(), TupleDescInitEntry(), and values.
| Datum pg_stat_get_backend_activity | ( | PG_FUNCTION_ARGS | ) |
Definition at line 791 of file pgstatfuncs.c.
References cstring_to_text(), fb(), HAS_PGSTAT_PERMISSIONS, pfree(), PG_GETARG_INT32, PG_RETURN_TEXT_P, pgstat_clip_activity(), and pgstat_get_beentry_by_proc_number().
| Datum pg_stat_get_backend_activity_start | ( | PG_FUNCTION_ARGS | ) |
Definition at line 859 of file pgstatfuncs.c.
References fb(), HAS_PGSTAT_PERMISSIONS, PG_GETARG_INT32, PG_RETURN_NULL, PG_RETURN_TIMESTAMPTZ, and pgstat_get_beentry_by_proc_number().
| Datum pg_stat_get_backend_client_addr | ( | PG_FUNCTION_ARGS | ) |
Definition at line 929 of file pgstatfuncs.c.
References clean_ipv6_addr(), CStringGetDatum(), DirectFunctionCall1, fb(), HAS_PGSTAT_PERMISSIONS, inet_in(), PG_GETARG_INT32, pg_getnameinfo_all(), pg_memory_is_all_zeros(), PG_RETURN_DATUM, PG_RETURN_NULL, and pgstat_get_beentry_by_proc_number().
| Datum pg_stat_get_backend_client_port | ( | PG_FUNCTION_ARGS | ) |
Definition at line 972 of file pgstatfuncs.c.
References CStringGetDatum(), DirectFunctionCall1, fb(), HAS_PGSTAT_PERMISSIONS, int4in(), PG_GETARG_INT32, pg_getnameinfo_all(), pg_memory_is_all_zeros(), PG_RETURN_DATUM, PG_RETURN_INT32, PG_RETURN_NULL, and pgstat_get_beentry_by_proc_number().
| Datum pg_stat_get_backend_dbid | ( | PG_FUNCTION_ARGS | ) |
Definition at line 731 of file pgstatfuncs.c.
References fb(), PG_GETARG_INT32, PG_RETURN_NULL, PG_RETURN_OID, and pgstat_get_beentry_by_proc_number().
| Datum pg_stat_get_backend_idset | ( | PG_FUNCTION_ARGS | ) |
Definition at line 225 of file pgstatfuncs.c.
References fb(), Int32GetDatum(), MemoryContextAlloc(), pgstat_fetch_stat_numbackends(), pgstat_get_local_beentry_by_index(), SRF_FIRSTCALL_INIT, SRF_IS_FIRSTCALL, SRF_PERCALL_SETUP, SRF_RETURN_DONE, and SRF_RETURN_NEXT.
| Datum pg_stat_get_backend_io | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1598 of file pgstatfuncs.c.
References Assert, fb(), InitMaterializedSRF(), PG_GETARG_INT32, pg_stat_io_build_tuples(), pgstat_bktype_io_stats_valid(), and pgstat_fetch_stat_backend_by_pid().
| Datum pg_stat_get_backend_pid | ( | PG_FUNCTION_ARGS | ) |
Definition at line 718 of file pgstatfuncs.c.
References fb(), PG_GETARG_INT32, PG_RETURN_INT32, PG_RETURN_NULL, and pgstat_get_beentry_by_proc_number().
| Datum pg_stat_get_backend_start | ( | PG_FUNCTION_ARGS | ) |
Definition at line 907 of file pgstatfuncs.c.
References fb(), HAS_PGSTAT_PERMISSIONS, PG_GETARG_INT32, PG_RETURN_NULL, PG_RETURN_TIMESTAMPTZ, and pgstat_get_beentry_by_proc_number().
| Datum pg_stat_get_backend_subxact | ( | PG_FUNCTION_ARGS | ) |
Definition at line 756 of file pgstatfuncs.c.
References BlessTupleDesc(), BoolGetDatum(), CreateTemplateTupleDesc(), fb(), heap_form_tuple(), HeapTupleGetDatum(), Int32GetDatum(), PG_GETARG_INT32, PG_RETURN_DATUM, PG_STAT_GET_SUBXACT_COLS, pgstat_get_local_beentry_by_proc_number(), TupleDescInitEntry(), and values.
| Datum pg_stat_get_backend_userid | ( | PG_FUNCTION_ARGS | ) |
Definition at line 744 of file pgstatfuncs.c.
References fb(), PG_GETARG_INT32, PG_RETURN_NULL, PG_RETURN_OID, and pgstat_get_beentry_by_proc_number().
| Datum pg_stat_get_backend_wait_event | ( | PG_FUNCTION_ARGS | ) |
Definition at line 837 of file pgstatfuncs.c.
References BackendPidGetProc(), cstring_to_text(), fb(), HAS_PGSTAT_PERMISSIONS, PG_GETARG_INT32, PG_RETURN_NULL, PG_RETURN_TEXT_P, pgstat_get_beentry_by_proc_number(), pgstat_get_wait_event(), and PGPROC::wait_event_info.
| Datum pg_stat_get_backend_wait_event_type | ( | PG_FUNCTION_ARGS | ) |
Definition at line 816 of file pgstatfuncs.c.
References BackendPidGetProc(), cstring_to_text(), fb(), HAS_PGSTAT_PERMISSIONS, PG_GETARG_INT32, PG_RETURN_NULL, PG_RETURN_TEXT_P, pgstat_get_beentry_by_proc_number(), pgstat_get_wait_event_type(), and PGPROC::wait_event_info.
| Datum pg_stat_get_backend_wal | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1695 of file pgstatfuncs.c.
References fb(), PG_GETARG_INT32, PG_RETURN_NULL, pg_stat_wal_build_tuple(), and pgstat_fetch_stat_backend_by_pid().
| Datum pg_stat_get_backend_xact_start | ( | PG_FUNCTION_ARGS | ) |
Definition at line 885 of file pgstatfuncs.c.
References fb(), HAS_PGSTAT_PERMISSIONS, PG_GETARG_INT32, PG_RETURN_NULL, PG_RETURN_TIMESTAMPTZ, and pgstat_get_beentry_by_proc_number().
| Datum pg_stat_get_bgwriter_buf_written_clean | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1283 of file pgstatfuncs.c.
References PG_RETURN_INT64, and pgstat_fetch_stat_bgwriter().
| Datum pg_stat_get_bgwriter_maxwritten_clean | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1289 of file pgstatfuncs.c.
References PG_RETURN_INT64, and pgstat_fetch_stat_bgwriter().
| Datum pg_stat_get_bgwriter_stat_reset_time | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1317 of file pgstatfuncs.c.
References PG_RETURN_TIMESTAMPTZ, and pgstat_fetch_stat_bgwriter().
| Datum pg_stat_get_buf_alloc | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1323 of file pgstatfuncs.c.
References PG_RETURN_INT64, and pgstat_fetch_stat_bgwriter().
| Datum pg_stat_get_checkpointer_buffers_written | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1271 of file pgstatfuncs.c.
References PG_RETURN_INT64, and pgstat_fetch_stat_checkpointer().
| Datum pg_stat_get_checkpointer_num_performed | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1247 of file pgstatfuncs.c.
References PG_RETURN_INT64, and pgstat_fetch_stat_checkpointer().
| Datum pg_stat_get_checkpointer_num_requested | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1241 of file pgstatfuncs.c.
References PG_RETURN_INT64, and pgstat_fetch_stat_checkpointer().
| Datum pg_stat_get_checkpointer_num_timed | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1235 of file pgstatfuncs.c.
References PG_RETURN_INT64, and pgstat_fetch_stat_checkpointer().
| Datum pg_stat_get_checkpointer_restartpoints_performed | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1265 of file pgstatfuncs.c.
References PG_RETURN_INT64, and pgstat_fetch_stat_checkpointer().
| Datum pg_stat_get_checkpointer_restartpoints_requested | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1259 of file pgstatfuncs.c.
References PG_RETURN_INT64, and pgstat_fetch_stat_checkpointer().
| Datum pg_stat_get_checkpointer_restartpoints_timed | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1253 of file pgstatfuncs.c.
References PG_RETURN_INT64, and pgstat_fetch_stat_checkpointer().
| Datum pg_stat_get_checkpointer_slru_written | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1277 of file pgstatfuncs.c.
References PG_RETURN_INT64, and pgstat_fetch_stat_checkpointer().
| Datum pg_stat_get_checkpointer_stat_reset_time | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1311 of file pgstatfuncs.c.
References PG_RETURN_TIMESTAMPTZ, and pgstat_fetch_stat_checkpointer().
| Datum pg_stat_get_checkpointer_sync_time | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1303 of file pgstatfuncs.c.
References PG_RETURN_FLOAT8, and pgstat_fetch_stat_checkpointer().
| Datum pg_stat_get_checkpointer_write_time | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1295 of file pgstatfuncs.c.
References PG_RETURN_FLOAT8, and pgstat_fetch_stat_checkpointer().
| Datum pg_stat_get_db_checksum_failures | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1164 of file pgstatfuncs.c.
References DataChecksumsEnabled(), fb(), PG_GETARG_OID, PG_RETURN_INT64, PG_RETURN_NULL, and pgstat_fetch_stat_dbentry().
| Datum pg_stat_get_db_checksum_last_failure | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1182 of file pgstatfuncs.c.
References DataChecksumsEnabled(), fb(), PG_GETARG_OID, PG_RETURN_NULL, PG_RETURN_TIMESTAMPTZ, and pgstat_fetch_stat_dbentry().
| Datum pg_stat_get_db_conflict_all | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1144 of file pgstatfuncs.c.
References fb(), PG_GETARG_OID, PG_RETURN_INT64, and pgstat_fetch_stat_dbentry().
| Datum pg_stat_get_db_numbackends | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1016 of file pgstatfuncs.c.
References fb(), idx(), PG_GETARG_OID, PG_RETURN_INT32, pgstat_fetch_stat_numbackends(), and pgstat_get_local_beentry_by_index().
| Datum pg_stat_get_db_stat_reset_time | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1125 of file pgstatfuncs.c.
References fb(), PG_GETARG_OID, PG_RETURN_NULL, PG_RETURN_TIMESTAMPTZ, pgstat_fetch_stat_dbentry(), and PgStat_StatDBEntry::stat_reset_timestamp.
| Datum pg_stat_get_function_calls | ( | PG_FUNCTION_ARGS | ) |
Definition at line 175 of file pgstatfuncs.c.
References fb(), PG_GETARG_OID, PG_RETURN_INT64, PG_RETURN_NULL, and pgstat_fetch_stat_funcentry().
| Datum pg_stat_get_function_stat_reset_time | ( | PG_FUNCTION_ARGS | ) |
Definition at line 207 of file pgstatfuncs.c.
References fb(), PG_GETARG_OID, PG_RETURN_NULL, PG_RETURN_TIMESTAMPTZ, pgstat_fetch_stat_funcentry(), and PgStat_StatFuncEntry::stat_reset_timestamp.
| Datum pg_stat_get_io | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1557 of file pgstatfuncs.c.
References Assert, BACKEND_NUM_TYPES, fb(), InitMaterializedSRF(), pg_stat_io_build_tuples(), pgstat_bktype_io_stats_valid(), pgstat_fetch_stat_io(), and pgstat_tracks_io_bktype().
| Datum pg_stat_get_progress_info | ( | PG_FUNCTION_ARGS | ) |
Definition at line 276 of file pgstatfuncs.c.
References ereport, errcode(), errmsg(), ERROR, fb(), HAS_PGSTAT_PERMISSIONS, i, InitMaterializedSRF(), Int32GetDatum(), Int64GetDatum(), ObjectIdGetDatum(), PG_GETARG_TEXT_PP, PG_STAT_GET_PROGRESS_COLS, pg_strcasecmp(), pgstat_fetch_stat_numbackends(), pgstat_get_local_beentry_by_index(), PGSTAT_NUM_PROGRESS_PARAM, PROGRESS_COMMAND_ANALYZE, PROGRESS_COMMAND_BASEBACKUP, PROGRESS_COMMAND_CLUSTER, PROGRESS_COMMAND_COPY, PROGRESS_COMMAND_CREATE_INDEX, PROGRESS_COMMAND_VACUUM, text_to_cstring(), tuplestore_putvalues(), and values.
| Datum pg_stat_get_replication_slot | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2130 of file pgstatfuncs.c.
References BlessTupleDesc(), CreateTemplateTupleDesc(), CStringGetTextDatum, fb(), heap_form_tuple(), HeapTupleGetDatum(), Int64GetDatum(), NameStr, namestrcpy(), PG_GETARG_TEXT_P, PG_RETURN_DATUM, PG_STAT_GET_REPLICATION_SLOT_COLS, pgstat_fetch_replslot(), text_to_cstring(), TimestampTzGetDatum(), TupleDescInitEntry(), and values.
| Datum pg_stat_get_slru | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1732 of file pgstatfuncs.c.
References cstring_to_text(), fb(), i, InitMaterializedSRF(), Int64GetDatum(), name, PG_STAT_GET_SLRU_COLS, pgstat_fetch_slru(), pgstat_get_slru_name(), PointerGetDatum(), stat, TimestampTzGetDatum(), tuplestore_putvalues(), and values.
| Datum pg_stat_get_snapshot_timestamp | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1852 of file pgstatfuncs.c.
References fb(), PG_RETURN_NULL, PG_RETURN_TIMESTAMPTZ, and pgstat_get_stat_snapshot_timestamp().
| Datum pg_stat_get_subscription_stats | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2214 of file pgstatfuncs.c.
References Assert, BlessTupleDesc(), CONFLICT_NUM_TYPES, CreateTemplateTupleDesc(), fb(), heap_form_tuple(), HeapTupleGetDatum(), i, Int64GetDatum(), ObjectIdGetDatum(), PG_GETARG_OID, PG_RETURN_DATUM, PG_STAT_GET_SUBSCRIPTION_STATS_COLS, pgstat_fetch_stat_subscription(), TimestampTzGetDatum(), TupleDescInitEntry(), and values.
| Datum pg_stat_get_wal | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1717 of file pgstatfuncs.c.
References fb(), pg_stat_wal_build_tuple(), and pgstat_fetch_stat_wal().
| Datum pg_stat_get_xact_function_calls | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1822 of file pgstatfuncs.c.
References fb(), find_funcstat_entry(), PG_GETARG_OID, PG_RETURN_INT64, and PG_RETURN_NULL.
| Datum pg_stat_have_stats | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2301 of file pgstatfuncs.c.
References fb(), PG_GETARG_INT64, PG_GETARG_OID, PG_GETARG_TEXT_P, PG_RETURN_BOOL, pgstat_get_kind_from_str(), pgstat_have_entry(), PgStat_Kind, and text_to_cstring().
|
static |
Definition at line 1460 of file pgstatfuncs.c.
References buf, CStringGetDatum(), CStringGetTextDatum, DirectFunctionCall3, fb(), Float8GetDatum(), GetBackendTypeDesc(), Int32GetDatum(), INT64_FORMAT, Int64GetDatum(), IO_COL_BACKEND_TYPE, IO_COL_CONTEXT, IO_COL_INVALID, IO_COL_OBJECT, IO_COL_RESET_TIME, IO_NUM_COLUMNS, IOCONTEXT_NUM_TYPES, IOOBJECT_NUM_TYPES, IOOP_NUM_TYPES, numeric_in(), ObjectIdGetDatum(), pg_stat_us_to_ms(), pgstat_get_io_byte_index(), pgstat_get_io_context_name(), pgstat_get_io_object_name(), pgstat_get_io_op_index(), pgstat_get_io_time_index(), pgstat_tracks_io_object(), pgstat_tracks_io_op(), snprintf, TimestampTzGetDatum(), tuplestore_putvalues(), and values.
Referenced by pg_stat_get_backend_io(), and pg_stat_get_io().
| Datum pg_stat_reset | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1887 of file pgstatfuncs.c.
References PG_RETURN_VOID, and pgstat_reset_counters().
| Datum pg_stat_reset_backend_stats | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1973 of file pgstatfuncs.c.
References AuxiliaryPidGetProc(), BackendPidGetProc(), fb(), GetNumberFromPGProc, InvalidOid, PG_GETARG_INT32, PG_RETURN_VOID, pgstat_get_beentry_by_proc_number(), PGSTAT_KIND_BACKEND, pgstat_reset(), and pgstat_tracks_backend_bktype().
| Datum pg_stat_reset_replication_slot | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2023 of file pgstatfuncs.c.
References fb(), PG_ARGISNULL, PG_GETARG_TEXT_PP, PG_RETURN_VOID, PGSTAT_KIND_REPLSLOT, pgstat_reset_of_kind(), pgstat_reset_replslot(), and text_to_cstring().
| Datum pg_stat_reset_shared | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1901 of file pgstatfuncs.c.
References ereport, errcode(), errhint(), errmsg(), ERROR, fb(), PG_ARGISNULL, PG_GETARG_TEXT_PP, PG_RETURN_VOID, PGSTAT_KIND_ARCHIVER, PGSTAT_KIND_BGWRITER, PGSTAT_KIND_CHECKPOINTER, PGSTAT_KIND_IO, PGSTAT_KIND_SLRU, PGSTAT_KIND_WAL, pgstat_reset_of_kind(), text_to_cstring(), and XLogPrefetchResetStats().
| Datum pg_stat_reset_single_function_counters | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1960 of file pgstatfuncs.c.
References fb(), MyDatabaseId, PG_GETARG_OID, PG_RETURN_VOID, PGSTAT_KIND_FUNCTION, and pgstat_reset().
| Datum pg_stat_reset_single_table_counters | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1949 of file pgstatfuncs.c.
References fb(), InvalidOid, IsSharedRelation(), MyDatabaseId, PG_GETARG_OID, PG_RETURN_VOID, PGSTAT_KIND_RELATION, and pgstat_reset().
| Datum pg_stat_reset_slru | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2006 of file pgstatfuncs.c.
References fb(), PG_ARGISNULL, PG_GETARG_TEXT_PP, PG_RETURN_VOID, PGSTAT_KIND_SLRU, pgstat_reset_of_kind(), pgstat_reset_slru(), and text_to_cstring().
| Datum pg_stat_reset_subscription_stats | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2040 of file pgstatfuncs.c.
References ereport, errcode(), errmsg(), ERROR, fb(), InvalidOid, OidIsValid, PG_ARGISNULL, PG_GETARG_OID, PG_RETURN_VOID, PGSTAT_KIND_SUBSCRIPTION, pgstat_reset(), and pgstat_reset_of_kind().
|
inlinestatic |
Definition at line 1447 of file pgstatfuncs.c.
References fb().
Referenced by pg_stat_io_build_tuples().
|
static |
Definition at line 1637 of file pgstatfuncs.c.
References BlessTupleDesc(), buf, CreateTemplateTupleDesc(), CStringGetDatum(), DirectFunctionCall3, fb(), heap_form_tuple(), HeapTupleGetDatum(), Int32GetDatum(), Int64GetDatum(), numeric_in(), ObjectIdGetDatum(), PG_RETURN_DATUM, PG_STAT_WAL_COLS, snprintf, TimestampTzGetDatum(), TupleDescInitEntry(), UINT64_FORMAT, values, PgStat_WalCounters::wal_buffers_full, PgStat_WalCounters::wal_bytes, PgStat_WalCounters::wal_fpi, PgStat_WalCounters::wal_fpi_bytes, and PgStat_WalCounters::wal_records.
Referenced by pg_stat_get_backend_wal(), and pg_stat_get_wal().
|
static |
Definition at line 1395 of file pgstatfuncs.c.
References elog, ERROR, fb(), IO_COL_EXTEND_BYTES, IO_COL_INVALID, IO_COL_READ_BYTES, IO_COL_WRITE_BYTES, IOOP_EVICT, IOOP_EXTEND, IOOP_FSYNC, IOOP_HIT, IOOP_READ, IOOP_REUSE, IOOP_WRITE, IOOP_WRITEBACK, and pg_unreachable.
Referenced by pg_stat_io_build_tuples().
|
static |
Definition at line 1364 of file pgstatfuncs.c.
References elog, ERROR, fb(), IO_COL_EVICTIONS, IO_COL_EXTENDS, IO_COL_FSYNCS, IO_COL_HITS, IO_COL_READS, IO_COL_REUSES, IO_COL_WRITEBACKS, IO_COL_WRITES, IOOP_EVICT, IOOP_EXTEND, IOOP_FSYNC, IOOP_HIT, IOOP_READ, IOOP_REUSE, IOOP_WRITE, IOOP_WRITEBACK, and pg_unreachable.
Referenced by pg_stat_io_build_tuples().
|
static |
Definition at line 1422 of file pgstatfuncs.c.
References elog, ERROR, fb(), IO_COL_EXTEND_TIME, IO_COL_FSYNC_TIME, IO_COL_INVALID, IO_COL_READ_TIME, IO_COL_WRITE_TIME, IO_COL_WRITEBACK_TIME, IOOP_EVICT, IOOP_EXTEND, IOOP_FSYNC, IOOP_HIT, IOOP_READ, IOOP_REUSE, IOOP_WRITE, IOOP_WRITEBACK, and pg_unreachable.
Referenced by pg_stat_io_build_tuples().