|
PostgreSQL Source Code git master
|
#include "postgres.h"#include "access/htup_details.h"#include "funcapi.h"#include "pgstat.h"#include "utils/builtins.h"#include "utils/pgstat_internal.h"
Go to the source code of this file.
Data Structures | |
| struct | PgStat_StatCustomFixedEntry |
| struct | PgStatShared_CustomFixedEntry |
Macros | |
| #define | PGSTAT_KIND_TEST_CUSTOM_FIXED_STATS 26 |
| #define | FIXED_COMP(fld) stat_snap->fld -= reset.fld; |
Typedefs | |
| typedef struct PgStat_StatCustomFixedEntry | PgStat_StatCustomFixedEntry |
| typedef struct PgStatShared_CustomFixedEntry | PgStatShared_CustomFixedEntry |
Functions | |
| PG_MODULE_MAGIC_EXT (.name="test_custom_fixed_stats",.version=PG_VERSION) | |
| static void | test_custom_stats_fixed_init_shmem_cb (void *stats) |
| static void | test_custom_stats_fixed_reset_all_cb (TimestampTz ts) |
| static void | test_custom_stats_fixed_snapshot_cb (void) |
| void | _PG_init (void) |
| PG_FUNCTION_INFO_V1 (test_custom_stats_fixed_update) | |
| Datum | test_custom_stats_fixed_update (PG_FUNCTION_ARGS) |
| PG_FUNCTION_INFO_V1 (test_custom_stats_fixed_reset) | |
| Datum | test_custom_stats_fixed_reset (PG_FUNCTION_ARGS) |
| PG_FUNCTION_INFO_V1 (test_custom_stats_fixed_report) | |
| Datum | test_custom_stats_fixed_report (PG_FUNCTION_ARGS) |
Variables | |
| static const PgStat_KindInfo | custom_stats |
| #define FIXED_COMP | ( | fld | ) | stat_snap->fld -= reset.fld; |
| #define PGSTAT_KIND_TEST_CUSTOM_FIXED_STATS 26 |
Definition at line 64 of file test_custom_fixed_stats.c.
| typedef struct PgStat_StatCustomFixedEntry PgStat_StatCustomFixedEntry |
| typedef struct PgStatShared_CustomFixedEntry PgStatShared_CustomFixedEntry |
| void _PG_init | ( | void | ) |
Definition at line 72 of file test_custom_fixed_stats.c.
References custom_stats, PGSTAT_KIND_TEST_CUSTOM_FIXED_STATS, pgstat_register_kind(), and process_shared_preload_libraries_in_progress.
| PG_FUNCTION_INFO_V1 | ( | test_custom_stats_fixed_report | ) |
| PG_FUNCTION_INFO_V1 | ( | test_custom_stats_fixed_reset | ) |
| PG_FUNCTION_INFO_V1 | ( | test_custom_stats_fixed_update | ) |
| PG_MODULE_MAGIC_EXT | ( | . | name = "test_custom_fixed_stats", |
| . | version = PG_VERSION |
||
| ) |
|
static |
Definition at line 87 of file test_custom_fixed_stats.c.
References PgStatShared_CustomFixedEntry::lock, and LWLockInitialize().
| Datum test_custom_stats_fixed_report | ( | PG_FUNCTION_ARGS | ) |
Definition at line 191 of file test_custom_fixed_stats.c.
References BlessTupleDesc(), CreateTemplateTupleDesc(), heap_form_tuple(), HeapTupleGetDatum(), Int64GetDatum(), PgStat_StatCustomFixedEntry::numcalls, PG_RETURN_DATUM, pgstat_get_custom_snapshot_data(), PGSTAT_KIND_TEST_CUSTOM_FIXED_STATS, pgstat_snapshot_fixed(), PgStat_StatCustomFixedEntry::stat_reset_timestamp, TimestampTzGetDatum(), TupleDescInitEntry(), and values.
| Datum test_custom_stats_fixed_reset | ( | PG_FUNCTION_ARGS | ) |
Definition at line 178 of file test_custom_fixed_stats.c.
References PG_RETURN_VOID, PGSTAT_KIND_TEST_CUSTOM_FIXED_STATS, and pgstat_reset_of_kind().
|
static |
Definition at line 100 of file test_custom_fixed_stats.c.
References PgStatShared_CustomFixedEntry::changecount, PgStatShared_CustomFixedEntry::lock, LW_EXCLUSIVE, LWLockAcquire(), LWLockRelease(), pgstat_copy_changecounted_stats(), pgstat_get_custom_shmem_data(), PGSTAT_KIND_TEST_CUSTOM_FIXED_STATS, PgStatShared_CustomFixedEntry::reset_offset, PgStat_StatCustomFixedEntry::stat_reset_timestamp, and PgStatShared_CustomFixedEntry::stats.
|
static |
Definition at line 120 of file test_custom_fixed_stats.c.
References PgStatShared_CustomFixedEntry::changecount, FIXED_COMP, PgStatShared_CustomFixedEntry::lock, LW_SHARED, LWLockAcquire(), LWLockRelease(), pgstat_copy_changecounted_stats(), pgstat_get_custom_shmem_data(), pgstat_get_custom_snapshot_data(), PGSTAT_KIND_TEST_CUSTOM_FIXED_STATS, reset(), PgStatShared_CustomFixedEntry::reset_offset, and PgStatShared_CustomFixedEntry::stats.
| Datum test_custom_stats_fixed_update | ( | PG_FUNCTION_ARGS | ) |
Definition at line 155 of file test_custom_fixed_stats.c.
References PgStatShared_CustomFixedEntry::changecount, PgStatShared_CustomFixedEntry::lock, LW_EXCLUSIVE, LWLockAcquire(), LWLockRelease(), PgStat_StatCustomFixedEntry::numcalls, PG_RETURN_VOID, pgstat_begin_changecount_write(), pgstat_end_changecount_write(), pgstat_get_custom_shmem_data(), PGSTAT_KIND_TEST_CUSTOM_FIXED_STATS, and PgStatShared_CustomFixedEntry::stats.
|
static |
Definition at line 47 of file test_custom_fixed_stats.c.
Referenced by _PG_init().