PostgreSQL Source Code  git master
startup.h
Go to the documentation of this file.
1 /*-------------------------------------------------------------------------
2  *
3  * startup.h
4  * Exports from postmaster/startup.c.
5  *
6  * Portions Copyright (c) 1996-2024, PostgreSQL Global Development Group
7  *
8  * src/include/postmaster/startup.h
9  *
10  *-------------------------------------------------------------------------
11  */
12 #ifndef _STARTUP_H
13 #define _STARTUP_H
14 
15 /*
16  * Log the startup progress message if a timer has expired.
17  */
18 #define ereport_startup_progress(msg, ...) \
19  do { \
20  long secs; \
21  int usecs; \
22  if (has_startup_progress_timeout_expired(&secs, &usecs)) \
23  ereport(LOG, errmsg(msg, secs, (usecs / 10000), __VA_ARGS__ )); \
24  } while(0)
25 
27 
28 extern void HandleStartupProcInterrupts(void);
29 extern void StartupProcessMain(char *startup_data, size_t startup_data_len) pg_attribute_noreturn();
30 extern void PreRestoreCommand(void);
31 extern void PostRestoreCommand(void);
32 extern bool IsPromoteSignaled(void);
33 extern void ResetPromoteSignaled(void);
34 
35 extern void enable_startup_progress_timeout(void);
36 extern void disable_startup_progress_timeout(void);
37 extern void begin_startup_progress_phase(void);
38 extern void startup_progress_timeout_handler(void);
39 extern bool has_startup_progress_timeout_expired(long *secs, int *usecs);
40 
41 #endif /* _STARTUP_H */
#define PGDLLIMPORT
Definition: c.h:1319
#define pg_attribute_noreturn()
Definition: c.h:232
void HandleStartupProcInterrupts(void)
Definition: startup.c:154
void disable_startup_progress_timeout(void)
Definition: startup.c:309
void StartupProcessMain(char *startup_data, size_t startup_data_len) pg_attribute_noreturn()
Definition: startup.c:216
bool IsPromoteSignaled(void)
Definition: startup.c:288
void PreRestoreCommand(void)
Definition: startup.c:268
void startup_progress_timeout_handler(void)
Definition: startup.c:303
PGDLLIMPORT int log_startup_progress_interval
Definition: startup.c:76
void begin_startup_progress_phase(void)
Definition: startup.c:343
void ResetPromoteSignaled(void)
Definition: startup.c:294
void PostRestoreCommand(void)
Definition: startup.c:282
void enable_startup_progress_timeout(void)
Definition: startup.c:323
bool has_startup_progress_timeout_expired(long *secs, int *usecs)
Definition: startup.c:359