Skip to content

Structure

PostgresClient.Configuration.Options

Describes general client behavior options. Those settings are considered advanced options.
struct Options

Topics

Structures

Initializers

  • init()
    Create an options structure with default values.

Instance Properties

  • additionalStartupParameters
    Additional parameters to send to the server on startup. The name value pairs are added to the initial startup message that the client sends to the server.
  • connectTimeout
    A timeout for creating a TCP/Unix domain socket connection. Defaults to 10 seconds.
  • connectionIdleTimeout
    The maximum amount of time that a connection that is not part of the minimumConnections is kept open without being leased. Defaults to 60 seconds.
  • keepAliveBehavior
    The PostgresClient.Configuration.Options.KeepAliveBehavior to ensure that the underlying tcp-connection is still active for idle connections. Nil means that the client shall not run keep alive queries to the server. Defaults to a keep alive query of SELECT 1; every 30 seconds.
  • maximumConnections
    The maximum number of connections that the client may open to the server at any time. Must be greater than minimumConnections. Defaults to 20 connections.
  • minimumConnections
    The minimum number of connections that the client shall keep open at any time, even if there is no demand. Defaults to 0.
  • requireBackendKeyData
    Whether the connection is required to provide backend key data (internal Postgres stuff).
  • tlsServerName
    The server name to use for certificate validation and SNI (Server Name Indication) when TLS is enabled. Defaults to none (but see below).

Relationships

Conforms To

  • Swift.Sendable
  • Swift.SendableMetatype