PostgreSQL Source Code
git master
|
#include "utils/wait_event_types.h"
Go to the source code of this file.
Macros | |
#define | PG_WAIT_LWLOCK 0x01000000U |
#define | PG_WAIT_LOCK 0x03000000U |
#define | PG_WAIT_BUFFERPIN 0x04000000U |
#define | PG_WAIT_ACTIVITY 0x05000000U |
#define | PG_WAIT_CLIENT 0x06000000U |
#define | PG_WAIT_EXTENSION 0x07000000U |
#define | PG_WAIT_IPC 0x08000000U |
#define | PG_WAIT_TIMEOUT 0x09000000U |
#define | PG_WAIT_IO 0x0A000000U |
#define | PG_WAIT_INJECTIONPOINT 0x0B000000U |
Functions | |
const char * | pgstat_get_wait_event (uint32 wait_event_info) |
const char * | pgstat_get_wait_event_type (uint32 wait_event_info) |
static void | pgstat_report_wait_start (uint32 wait_event_info) |
static void | pgstat_report_wait_end (void) |
void | pgstat_set_wait_event_storage (uint32 *wait_event_info) |
void | pgstat_reset_wait_event_storage (void) |
uint32 | WaitEventExtensionNew (const char *wait_event_name) |
uint32 | WaitEventInjectionPointNew (const char *wait_event_name) |
void | WaitEventCustomShmemInit (void) |
Size | WaitEventCustomShmemSize (void) |
char ** | GetWaitEventCustomNames (uint32 classId, int *nwaitevents) |
Variables | |
PGDLLIMPORT uint32 * | my_wait_event_info |
#define PG_WAIT_ACTIVITY 0x05000000U |
Definition at line 21 of file wait_event.h.
#define PG_WAIT_BUFFERPIN 0x04000000U |
Definition at line 20 of file wait_event.h.
#define PG_WAIT_CLIENT 0x06000000U |
Definition at line 22 of file wait_event.h.
#define PG_WAIT_EXTENSION 0x07000000U |
Definition at line 23 of file wait_event.h.
#define PG_WAIT_INJECTIONPOINT 0x0B000000U |
Definition at line 27 of file wait_event.h.
#define PG_WAIT_IO 0x0A000000U |
Definition at line 26 of file wait_event.h.
#define PG_WAIT_IPC 0x08000000U |
Definition at line 24 of file wait_event.h.
#define PG_WAIT_LOCK 0x03000000U |
Definition at line 19 of file wait_event.h.
#define PG_WAIT_LWLOCK 0x01000000U |
Definition at line 18 of file wait_event.h.
#define PG_WAIT_TIMEOUT 0x09000000U |
Definition at line 25 of file wait_event.h.
char** GetWaitEventCustomNames | ( | uint32 | classId, |
int * | nwaitevents | ||
) |
Definition at line 307 of file wait_event.c.
References hash_get_num_entries(), hash_seq_init(), hash_seq_search(), LW_SHARED, LWLockAcquire(), LWLockRelease(), palloc(), pstrdup(), WAIT_EVENT_CLASS_MASK, WaitEventCustomEntryByName::wait_event_info, WaitEventCustomEntryByName::wait_event_name, and WaitEventCustomHashByName.
Referenced by pg_get_wait_events().
const char* pgstat_get_wait_event | ( | uint32 | wait_event_info | ) |
Definition at line 432 of file wait_event.c.
References GetLockNameFromTagType(), GetLWLockIdentifier(), GetWaitEventCustomIdentifier(), PG_WAIT_ACTIVITY, PG_WAIT_BUFFERPIN, PG_WAIT_CLIENT, PG_WAIT_EXTENSION, PG_WAIT_INJECTIONPOINT, PG_WAIT_IO, PG_WAIT_IPC, PG_WAIT_LOCK, PG_WAIT_LWLOCK, PG_WAIT_TIMEOUT, pgstat_get_wait_activity(), pgstat_get_wait_bufferpin(), pgstat_get_wait_client(), pgstat_get_wait_io(), pgstat_get_wait_ipc(), pgstat_get_wait_timeout(), WAIT_EVENT_CLASS_MASK, and WAIT_EVENT_ID_MASK.
Referenced by pg_stat_get_activity(), and pg_stat_get_backend_wait_event().
const char* pgstat_get_wait_event_type | ( | uint32 | wait_event_info | ) |
Definition at line 374 of file wait_event.c.
References PG_WAIT_ACTIVITY, PG_WAIT_BUFFERPIN, PG_WAIT_CLIENT, PG_WAIT_EXTENSION, PG_WAIT_INJECTIONPOINT, PG_WAIT_IO, PG_WAIT_IPC, PG_WAIT_LOCK, PG_WAIT_LWLOCK, PG_WAIT_TIMEOUT, and WAIT_EVENT_CLASS_MASK.
Referenced by pg_isolation_test_session_is_blocked(), pg_stat_get_activity(), pg_stat_get_backend_wait_event_type(), and WaitEventCustomNew().
|
inlinestatic |
Definition at line 101 of file wait_event.h.
References my_wait_event_info.
Referenced by AbortSubTransaction(), AbortTransaction(), AddToDataDirLockFile(), ApplyLogicalMappingFile(), assign_wal_sync_method(), BackgroundWriterMain(), basebackup_read_file(), BootStrapXLOG(), CheckpointerMain(), CheckPointLogicalRewriteHeap(), copy_file(), CreateCheckPoint(), CreateDirAndVersionFile(), CreateLockFile(), dsm_impl_mmap(), dsm_impl_posix_resize(), ExecuteRecoveryCommand(), FileFallocate(), FilePrefetch(), FileReadV(), FileSync(), FileTruncate(), FileWriteback(), FileWriteV(), FileZero(), heap_xlog_logical_rewrite(), issue_xlog_fsync(), LWLockReportWaitEnd(), perform_spin_delay(), pgarch_archiveXlog(), ProcArrayGroupClearXid(), read_relmap_file(), ReadControlFile(), readTimeLineHistory(), ReadTwoPhaseFile(), RecheckDataDirLockFile(), RecreateTwoPhaseFile(), ReorderBufferSerializeChange(), RestoreArchivedFile(), RestoreSlotFromDisk(), SaveSlotToPath(), SendTimeLineHistory(), shell_archive_file(), ShutdownAuxiliaryProcess(), SlruPhysicalReadPage(), SlruPhysicalWritePage(), SlruSyncFileTag(), SnapBuildRestoreContents(), SnapBuildSerialize(), TransactionGroupUpdateXidStatus(), update_controlfile(), vacuum_delay_point(), WaitEventSetWait(), WaitExceedsMaxStandbyDelay(), WALRead(), WalSndErrorCleanup(), WalSummarizerMain(), WalWriterMain(), write_relmap_file(), WriteControlFile(), writeTimeLineHistory(), writeTimeLineHistoryFile(), XLogFileCopy(), XLogFileInitInternal(), XLogPageRead(), and XLogWrite().
|
inlinestatic |
Definition at line 85 of file wait_event.h.
References my_wait_event_info.
Referenced by AddToDataDirLockFile(), ApplyLogicalMappingFile(), assign_wal_sync_method(), basebackup_read_file(), BootStrapXLOG(), CheckPointLogicalRewriteHeap(), copy_file(), CreateCheckPoint(), CreateDirAndVersionFile(), CreateLockFile(), dsm_impl_mmap(), dsm_impl_posix_resize(), ExecuteRecoveryCommand(), FileFallocate(), FilePrefetch(), FileReadV(), FileSync(), FileTruncate(), FileWriteback(), FileWriteV(), FileZero(), heap_xlog_logical_rewrite(), issue_xlog_fsync(), LWLockReportWaitStart(), perform_spin_delay(), ProcArrayGroupClearXid(), read_relmap_file(), ReadControlFile(), readTimeLineHistory(), ReadTwoPhaseFile(), RecheckDataDirLockFile(), RecreateTwoPhaseFile(), ReorderBufferSerializeChange(), RestoreArchivedFile(), RestoreSlotFromDisk(), SaveSlotToPath(), SendTimeLineHistory(), shell_archive_file(), SlruPhysicalReadPage(), SlruPhysicalWritePage(), SlruSyncFileTag(), SnapBuildRestoreContents(), SnapBuildSerialize(), TransactionGroupUpdateXidStatus(), update_controlfile(), vacuum_delay_point(), WaitEventSetWait(), WaitExceedsMaxStandbyDelay(), WALRead(), write_relmap_file(), WriteControlFile(), writeTimeLineHistory(), writeTimeLineHistoryFile(), XLogFileCopy(), XLogFileInitInternal(), XLogPageRead(), and XLogWrite().
void pgstat_reset_wait_event_storage | ( | void | ) |
Definition at line 362 of file wait_event.c.
References local_my_wait_event_info, and my_wait_event_info.
Referenced by AuxiliaryProcKill(), and ProcKill().
void pgstat_set_wait_event_storage | ( | uint32 * | wait_event_info | ) |
Definition at line 350 of file wait_event.c.
References my_wait_event_info.
Referenced by InitAuxiliaryProcess(), and InitProcess().
void WaitEventCustomShmemInit | ( | void | ) |
Definition at line 120 of file wait_event.c.
References HASHCTL::entrysize, HASH_BLOBS, HASH_ELEM, HASH_STRINGS, HASHCTL::keysize, WaitEventCustomCounterData::mutex, NAMEDATALEN, WaitEventCustomCounterData::nextId, ShmemInitHash(), ShmemInitStruct(), SpinLockInit, WAIT_EVENT_CUSTOM_HASH_INIT_SIZE, WAIT_EVENT_CUSTOM_HASH_MAX_SIZE, WAIT_EVENT_CUSTOM_INITIAL_ID, WaitEventCustomCounter, WaitEventCustomHashByInfo, and WaitEventCustomHashByName.
Referenced by CreateOrAttachShmemStructs().
Size WaitEventCustomShmemSize | ( | void | ) |
Definition at line 104 of file wait_event.c.
References add_size(), hash_estimate_size(), MAXALIGN, and WAIT_EVENT_CUSTOM_HASH_MAX_SIZE.
Referenced by CalculateShmemSize().
uint32 WaitEventExtensionNew | ( | const char * | wait_event_name | ) |
Definition at line 164 of file wait_event.c.
References PG_WAIT_EXTENSION, and WaitEventCustomNew().
Referenced by connect_pg_server(), dblink_connect(), dblink_get_conn(), dblink_init(), GetConnection(), pgfdw_get_cleanup_result(), test_shm_mq_pipelined(), wait_for_workers_to_become_ready(), and worker_spi_main().
uint32 WaitEventInjectionPointNew | ( | const char * | wait_event_name | ) |
Definition at line 170 of file wait_event.c.
References PG_WAIT_INJECTIONPOINT, and WaitEventCustomNew().
Referenced by injection_wait().
|
extern |
Definition at line 41 of file wait_event.c.
Referenced by pgstat_report_wait_end(), pgstat_report_wait_start(), pgstat_reset_wait_event_storage(), and pgstat_set_wait_event_storage().