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:121
void AutoVacLauncherMain(char *startup_data, size_t startup_data_len) pg_attribute_noreturn()
PGDLLIMPORT int autovacuum_anl_thresh
Definition: autovacuum.c:124
PGDLLIMPORT int autovacuum_vac_thresh
Definition: autovacuum.c:120
PGDLLIMPORT int autovacuum_vac_ins_thresh
Definition: autovacuum.c:122
PGDLLIMPORT int autovacuum_vac_cost_limit
Definition: autovacuum.c:130
Size AutoVacuumShmemSize(void)
Definition: autovacuum.c:3259
void AutoVacuumShmemInit(void)
Definition: autovacuum.c:3278
PGDLLIMPORT double autovacuum_anl_scale
Definition: autovacuum.c:125
bool AutoVacuumRequestWork(AutoVacuumWorkItemType type, Oid relationId, BlockNumber blkno)
Definition: autovacuum.c:3204
bool AutoVacuumingActive(void)
Definition: autovacuum.c:3192
PGDLLIMPORT double autovacuum_vac_ins_scale
Definition: autovacuum.c:123
void AutoVacWorkerMain(char *startup_data, size_t startup_data_len) pg_attribute_noreturn()
Definition: autovacuum.c:1359
PGDLLIMPORT int autovacuum_work_mem
Definition: autovacuum.c:118
PGDLLIMPORT int autovacuum_freeze_max_age
Definition: autovacuum.c:126
PGDLLIMPORT int autovacuum_naptime
Definition: autovacuum.c:119
PGDLLIMPORT double autovacuum_vac_cost_delay
Definition: autovacuum.c:129
void AutoVacWorkerFailed(void)
Definition: autovacuum.c:1337
PGDLLIMPORT int AutovacuumLauncherPid
Definition: autovacuum.c:312
void autovac_init(void)
Definition: autovacuum.c:3246
PGDLLIMPORT bool autovacuum_start_daemon
Definition: autovacuum.c:116
PGDLLIMPORT int autovacuum_max_workers
Definition: autovacuum.c:117
PGDLLIMPORT int Log_autovacuum_min_duration
Definition: autovacuum.c:132
PGDLLIMPORT int autovacuum_multixact_freeze_max_age
Definition: autovacuum.c:127
uint32 BlockNumber
Definition: block.h:31
#define PGDLLIMPORT
Definition: c.h:1316
#define pg_attribute_noreturn()
Definition: c.h:217
size_t Size
Definition: c.h:605
unsigned int Oid
Definition: postgres_ext.h:31
const char * type