PostgreSQL Source Code  git master
autovacuum.h
Go to the documentation of this file.
1 /*-------------------------------------------------------------------------
2  *
3  * autovacuum.h
4  * header file for integrated autovacuum daemon
5  *
6  *
7  * Portions Copyright (c) 1996-2024, PostgreSQL Global Development Group
8  * Portions Copyright (c) 1994, Regents of the University of California
9  *
10  * src/include/postmaster/autovacuum.h
11  *
12  *-------------------------------------------------------------------------
13  */
14 #ifndef AUTOVACUUM_H
15 #define AUTOVACUUM_H
16 
17 #include "storage/block.h"
18 
19 /*
20  * Other processes can request specific work from autovacuum, identified by
21  * AutoVacuumWorkItem elements.
22  */
23 typedef enum
24 {
27 
28 
29 /* GUC variables */
35 extern PGDLLIMPORT double autovacuum_vac_scale;
39 extern PGDLLIMPORT double autovacuum_anl_scale;
44 
45 /* autovacuum launcher PID, only valid when worker is shutting down */
47 
49 
50 /* Status inquiry functions */
51 extern bool AutoVacuumingActive(void);
52 
53 /* called from postmaster at server startup */
54 extern void autovac_init(void);
55 
56 /* called from postmaster when a worker could not be forked */
57 extern void AutoVacWorkerFailed(void);
58 
59 extern void AutoVacLauncherMain(char *startup_data, size_t startup_data_len) pg_attribute_noreturn();
60 extern void AutoVacWorkerMain(char *startup_data, size_t startup_data_len) pg_attribute_noreturn();
61 
63  Oid relationId, BlockNumber blkno);
64 
65 /* shared memory stuff */
66 extern Size AutoVacuumShmemSize(void);
67 extern void AutoVacuumShmemInit(void);
68 
69 #endif /* AUTOVACUUM_H */
AutoVacuumWorkItemType
Definition: autovacuum.h:24
@ AVW_BRINSummarizeRange
Definition: autovacuum.h:25
PGDLLIMPORT double autovacuum_vac_scale
Definition: autovacuum.c:122
void AutoVacLauncherMain(char *startup_data, size_t startup_data_len) pg_attribute_noreturn()
PGDLLIMPORT int autovacuum_anl_thresh
Definition: autovacuum.c:125
PGDLLIMPORT int autovacuum_vac_thresh
Definition: autovacuum.c:121
PGDLLIMPORT int autovacuum_vac_ins_thresh
Definition: autovacuum.c:123
PGDLLIMPORT int autovacuum_vac_cost_limit
Definition: autovacuum.c:131
Size AutoVacuumShmemSize(void)
Definition: autovacuum.c:3267
void AutoVacuumShmemInit(void)
Definition: autovacuum.c:3286
PGDLLIMPORT double autovacuum_anl_scale
Definition: autovacuum.c:126
bool AutoVacuumRequestWork(AutoVacuumWorkItemType type, Oid relationId, BlockNumber blkno)
Definition: autovacuum.c:3212
bool AutoVacuumingActive(void)
Definition: autovacuum.c:3200
PGDLLIMPORT double autovacuum_vac_ins_scale
Definition: autovacuum.c:124
void AutoVacWorkerMain(char *startup_data, size_t startup_data_len) pg_attribute_noreturn()
Definition: autovacuum.c:1361
PGDLLIMPORT int autovacuum_work_mem
Definition: autovacuum.c:119
PGDLLIMPORT int autovacuum_freeze_max_age
Definition: autovacuum.c:127
PGDLLIMPORT int autovacuum_naptime
Definition: autovacuum.c:120
PGDLLIMPORT double autovacuum_vac_cost_delay
Definition: autovacuum.c:130
void AutoVacWorkerFailed(void)
Definition: autovacuum.c:1339
PGDLLIMPORT int AutovacuumLauncherPid
Definition: autovacuum.c:314
void autovac_init(void)
Definition: autovacuum.c:3254
PGDLLIMPORT bool autovacuum_start_daemon
Definition: autovacuum.c:117
PGDLLIMPORT int autovacuum_max_workers
Definition: autovacuum.c:118
PGDLLIMPORT int Log_autovacuum_min_duration
Definition: autovacuum.c:133
PGDLLIMPORT int autovacuum_multixact_freeze_max_age
Definition: autovacuum.c:128
uint32 BlockNumber
Definition: block.h:31
#define PGDLLIMPORT
Definition: c.h:1274
#define pg_attribute_noreturn()
Definition: c.h:236
size_t Size
Definition: c.h:559
unsigned int Oid
Definition: postgres_ext.h:31
const char * type