pg_amcheck: Fix test failure on Windows with non-existing role
[pgsql.git] / src / include / tcop / backend_startup.h
blob01baf4aad75699e7220580db61f1c29de910379c
1 /*-------------------------------------------------------------------------
3 * backend_startup.h
4 * prototypes for backend_startup.c.
7 * Portions Copyright (c) 1996-2025, PostgreSQL Global Development Group
8 * Portions Copyright (c) 1994, Regents of the University of California
10 * src/include/tcop/backend_startup.h
12 *-------------------------------------------------------------------------
14 #ifndef BACKEND_STARTUP_H
15 #define BACKEND_STARTUP_H
17 /* GUCs */
18 extern PGDLLIMPORT bool Trace_connection_negotiation;
21 * CAC_state is passed from postmaster to the backend process, to indicate
22 * whether the connection should be accepted, or if the process should just
23 * send an error to the client and close the connection. Note that the
24 * connection can fail for various reasons even if postmaster passed CAC_OK.
26 typedef enum CAC_state
28 CAC_OK,
29 CAC_STARTUP,
30 CAC_SHUTDOWN,
31 CAC_RECOVERY,
32 CAC_NOTCONSISTENT,
33 CAC_TOOMANY,
34 } CAC_state;
36 /* Information passed from postmaster to backend process in 'startup_data' */
37 typedef struct BackendStartupData
39 CAC_state canAcceptConnections;
40 } BackendStartupData;
42 extern void BackendMain(char *startup_data, size_t startup_data_len) pg_attribute_noreturn();
44 #endif /* BACKEND_STARTUP_H */