PostgreSQL Source Code  git master
backend_progress.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define PGSTAT_NUM_PROGRESS_PARAM   20
 

Typedefs

typedef enum ProgressCommandType ProgressCommandType
 

Enumerations

enum  ProgressCommandType {
  PROGRESS_COMMAND_INVALID , PROGRESS_COMMAND_VACUUM , PROGRESS_COMMAND_ANALYZE , PROGRESS_COMMAND_CLUSTER ,
  PROGRESS_COMMAND_CREATE_INDEX , PROGRESS_COMMAND_BASEBACKUP , PROGRESS_COMMAND_COPY
}
 

Functions

void pgstat_progress_start_command (ProgressCommandType cmdtype, Oid relid)
 
void pgstat_progress_update_param (int index, int64 val)
 
void pgstat_progress_update_multi_param (int nparam, const int *index, const int64 *val)
 
void pgstat_progress_end_command (void)
 

Macro Definition Documentation

◆ PGSTAT_NUM_PROGRESS_PARAM

#define PGSTAT_NUM_PROGRESS_PARAM   20

Definition at line 33 of file backend_progress.h.

Typedef Documentation

◆ ProgressCommandType

Enumeration Type Documentation

◆ ProgressCommandType

Enumerator
PROGRESS_COMMAND_INVALID 
PROGRESS_COMMAND_VACUUM 
PROGRESS_COMMAND_ANALYZE 
PROGRESS_COMMAND_CLUSTER 
PROGRESS_COMMAND_CREATE_INDEX 
PROGRESS_COMMAND_BASEBACKUP 
PROGRESS_COMMAND_COPY 

Definition at line 22 of file backend_progress.h.

23 {
ProgressCommandType
@ PROGRESS_COMMAND_ANALYZE
@ PROGRESS_COMMAND_CLUSTER
@ PROGRESS_COMMAND_CREATE_INDEX
@ PROGRESS_COMMAND_VACUUM
@ PROGRESS_COMMAND_INVALID
@ PROGRESS_COMMAND_BASEBACKUP
@ PROGRESS_COMMAND_COPY

Function Documentation

◆ pgstat_progress_end_command()

void pgstat_progress_end_command ( void  )

Definition at line 98 of file backend_progress.c.

99 {
100  volatile PgBackendStatus *beentry = MyBEEntry;
101 
102  if (!beentry || !pgstat_track_activities)
103  return;
104 
106  return;
107 
111  PGSTAT_END_WRITE_ACTIVITY(beentry);
112 }
PgBackendStatus * MyBEEntry
bool pgstat_track_activities
#define PGSTAT_END_WRITE_ACTIVITY(beentry)
#define PGSTAT_BEGIN_WRITE_ACTIVITY(beentry)
#define InvalidOid
Definition: postgres_ext.h:36
ProgressCommandType st_progress_command
Oid st_progress_command_target

References InvalidOid, MyBEEntry, PGSTAT_BEGIN_WRITE_ACTIVITY, PGSTAT_END_WRITE_ACTIVITY, pgstat_track_activities, PROGRESS_COMMAND_INVALID, PgBackendStatus::st_progress_command, and PgBackendStatus::st_progress_command_target.

Referenced by AbortSubTransaction(), AbortTransaction(), analyze_rel(), basebackup_progress_done(), cluster_rel(), DefineIndex(), EndCopy(), EndCopyFrom(), heap_vacuum_rel(), reindex_index(), and ReindexRelationConcurrently().

◆ pgstat_progress_start_command()

void pgstat_progress_start_command ( ProgressCommandType  cmdtype,
Oid  relid 
)

◆ pgstat_progress_update_multi_param()

void pgstat_progress_update_multi_param ( int  nparam,
const int *  index,
const int64 *  val 
)

◆ pgstat_progress_update_param()

void pgstat_progress_update_param ( int  index,
int64  val 
)

Definition at line 47 of file backend_progress.c.

48 {
49  volatile PgBackendStatus *beentry = MyBEEntry;
50 
52 
53  if (!beentry || !pgstat_track_activities)
54  return;
55 
57  beentry->st_progress_param[index] = val;
59 }

References Assert(), MyBEEntry, PGSTAT_BEGIN_WRITE_ACTIVITY, PGSTAT_END_WRITE_ACTIVITY, PGSTAT_NUM_PROGRESS_PARAM, pgstat_track_activities, PgBackendStatus::st_progress_param, and val.

Referenced by _bt_leafbuild(), _bt_load(), _bt_parallel_scan_and_sort(), _bt_spools_heapscan(), _h_indexbuild(), acquire_inherited_sample_rows(), acquire_sample_rows(), basebackup_progress_estimate_backup_size(), basebackup_progress_transfer_wal(), basebackup_progress_wait_checkpoint(), bbsink_progress_end_archive(), bbsink_progress_new(), btvacuumscan(), BuildRelationExtStatistics(), cluster_rel(), copy_dest_receive(), CopyFrom(), CopyLoadRawBuf(), CopySendEndOfRow(), DefineIndex(), do_analyze_rel(), DoCopyTo(), finish_heap_swap(), hashbuild(), heap_vacuum_rel(), heapam_index_build_range_scan(), heapam_index_validate_scan(), heapam_relation_copy_for_cluster(), lazy_cleanup_all_indexes(), lazy_scan_heap(), lazy_scan_prune(), lazy_truncate_heap(), lazy_vacuum_all_indexes(), lazy_vacuum_heap_page(), lazy_vacuum_heap_rel(), reindex_index(), reindex_relation(), ReindexRelationConcurrently(), validate_index(), WaitForLockersMultiple(), and WaitForOlderSnapshots().