PostgreSQL Source Code
git master
backend_startup.h
Go to the documentation of this file.
1
/*-------------------------------------------------------------------------
2
*
3
* backend_startup.h
4
* prototypes for backend_startup.c.
5
*
6
*
7
* Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
8
* Portions Copyright (c) 1994, Regents of the University of California
9
*
10
* src/include/tcop/backend_startup.h
11
*
12
*-------------------------------------------------------------------------
13
*/
14
#ifndef BACKEND_STARTUP_H
15
#define BACKEND_STARTUP_H
16
17
/*
18
* CAC_state is passed from postmaster to the backend process, to indicate
19
* whether the connection should be accepted, or if the process should just
20
* send an error to the client and close the connection. Note that the
21
* connection can fail for various reasons even if postmaster passed CAC_OK.
22
*/
23
typedef
enum
CAC_state
24
{
25
CAC_OK
,
26
CAC_STARTUP
,
27
CAC_SHUTDOWN
,
28
CAC_RECOVERY
,
29
CAC_NOTCONSISTENT
,
30
CAC_TOOMANY
,
31
}
CAC_state
;
32
33
/* Information passed from postmaster to backend process in 'startup_data' */
34
typedef
struct
BackendStartupData
35
{
36
CAC_state
canAcceptConnections
;
37
}
BackendStartupData
;
38
39
extern
void
BackendMain
(
char
*startup_data,
size_t
startup_data_len)
pg_attribute_noreturn
();
40
41
#endif
/* BACKEND_STARTUP_H */
BackendStartupData
struct BackendStartupData BackendStartupData
BackendMain
void BackendMain(char *startup_data, size_t startup_data_len) pg_attribute_noreturn()
Definition:
backend_startup.c:57
CAC_state
CAC_state
Definition:
backend_startup.h:24
CAC_TOOMANY
@ CAC_TOOMANY
Definition:
backend_startup.h:30
CAC_OK
@ CAC_OK
Definition:
backend_startup.h:25
CAC_RECOVERY
@ CAC_RECOVERY
Definition:
backend_startup.h:28
CAC_NOTCONSISTENT
@ CAC_NOTCONSISTENT
Definition:
backend_startup.h:29
CAC_STARTUP
@ CAC_STARTUP
Definition:
backend_startup.h:26
CAC_SHUTDOWN
@ CAC_SHUTDOWN
Definition:
backend_startup.h:27
pg_attribute_noreturn
#define pg_attribute_noreturn()
Definition:
c.h:217
BackendStartupData
Definition:
backend_startup.h:35
BackendStartupData::canAcceptConnections
CAC_state canAcceptConnections
Definition:
backend_startup.h:36
src
include
tcop
backend_startup.h
Generated on Sun Apr 28 2024 00:13:24 for PostgreSQL Source Code by
1.9.1