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-2022, 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(void) 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 begin_startup_progress_phase(void);
36 extern void startup_progress_timeout_handler(void);
37 extern bool has_startup_progress_timeout_expired(long *secs, int *usecs);
38 
39 #endif /* _STARTUP_H */
#define PGDLLIMPORT
Definition: c.h:1331
#define pg_attribute_noreturn()
Definition: c.h:179
void HandleStartupProcInterrupts(void)
Definition: startup.c:168
bool IsPromoteSignaled(void)
Definition: startup.c:297
void PreRestoreCommand(void)
Definition: startup.c:277
void startup_progress_timeout_handler(void)
Definition: startup.c:312
PGDLLIMPORT int log_startup_progress_interval
Definition: startup.c:78
void begin_startup_progress_phase(void)
Definition: startup.c:321
void ResetPromoteSignaled(void)
Definition: startup.c:303
void StartupProcessMain(void) pg_attribute_noreturn()
Definition: startup.c:230
void PostRestoreCommand(void)
Definition: startup.c:291
bool has_startup_progress_timeout_expired(long *secs, int *usecs)
Definition: startup.c:344