1/*-------------------------------------------------------------------------
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
28 * CAC_state is passed from postmaster to the backend process, to indicate
29 * whether the connection should be accepted, or if the process should just
30 * send an error to the client and close the connection. Note that the
31 * connection can fail for various reasons even if postmaster passed CAC_OK.
43/* Information passed from postmaster to backend process in 'startup_data' */
49 * Time at which the connection client socket is created. Only used for
50 * client and wal sender connections.
55 * Time at which the postmaster initiates process creation -- either
56 * through fork or otherwise. Only used for client and wal sender
63 * Granular control over which messages to log for the log_connections GUC.
65 * RECEIPT, AUTHENTICATION, AUTHORIZATION, and SETUP_DURATIONS are different
66 * aspects of connection establishment and backend setup for which we may emit
69 * ALL is a convenience alias equivalent to all of the above aspects.
71 * ON is backwards compatibility alias for the connection aspects that were
72 * logged in Postgres versions < 18.
92 * A collection of timings of various stages of connection establishment and
93 * setup for client backends and WAL senders.
95 * Used to emit the setup_durations log message for the log_connections GUC.
100 * The time at which the client socket is created and the time at which
101 * the connection is fully set up and first ready for query. Together
102 * these represent the total connection establishment and setup time.
107 /* Time at which process creation was initiated */
110 /* Time at which process creation was completed */
113 /* Time at which authentication started */
116 /* Time at which authentication was finished */
122#endif /* BACKEND_STARTUP_H */
struct BackendStartupData BackendStartupData
PGDLLIMPORT struct ConnectionTiming conn_timing
pg_noreturn void BackendMain(const void *startup_data, size_t startup_data_len)
PGDLLIMPORT uint32 log_connections
@ LOG_CONNECTION_AUTHORIZATION
@ LOG_CONNECTION_SETUP_DURATIONS
@ LOG_CONNECTION_AUTHENTICATION
PGDLLIMPORT bool Trace_connection_negotiation
struct ConnectionTiming ConnectionTiming
PGDLLIMPORT char * log_connections_string
CAC_state canAcceptConnections
TimestampTz socket_created
TimestampTz ready_for_use
TimestampTz socket_create