SGPoolingConfig


Kind: SGPoolingConfig

listKind: SGPoolingConfigList

plural: sgpoolconfigs

singular: sgpoolconfig

shortNames sgpoc


The SGPoolingConfig custom resource represents the configuration of the connection pooling, in particular of PgBouncer.

Example:

apiVersion: stackgres.io/v1
kind: SGPoolingConfig
metadata:
  name: pgbouncerconf
spec:
  pgBouncer:
    pgbouncer.ini:
      pgbouncer:
        max_client_conn: '2000'
        default_pool_size: '50'
      databases:
        foodb:
          max_db_connections: 1000
          pool_size: 20
          dbname: 'bardb'
          reserve_pool: 5
      users:
        user1:
          pool_mode: transaction
          max_user_connections: 50
        user2:
          pool_mode: session
          max_user_connections: '100'

See also Coonection Pooling Configuration section.

Property
Required
Updatable
May Require Restart
Type
Description

Workaround for hugo bug not rendering first table row

apiVersion string stackgres.io/v1
kind string SGPoolingConfig
metadata object Refer to the Kubernetes API documentation for the fields of the metadata field.
spec object
status object

SGPoolingConfig.spec

↩ Parent

Property
Required
Updatable
May Require Restart
Type
Description

Workaround for hugo bug not rendering first table row

pgBouncer object Connection pooling configuration based on PgBouncer.

SGPoolingConfig.spec.pgBouncer

↩ Parent

Connection pooling configuration based on PgBouncer.

Property
Required
Updatable
May Require Restart
Type
Description

Workaround for hugo bug not rendering first table row

pgbouncer.ini object The pgbouncer.ini parameters the configuration contains, represented as an object where the keys are valid names for the pgbouncer.ini configuration file parameters.

Check pgbouncer configuration for more information about supported parameters.

SGPoolingConfig.spec.pgBouncer.pgbouncer.ini

↩ Parent

The pgbouncer.ini parameters the configuration contains, represented as an object where the keys are valid names for the pgbouncer.ini configuration file parameters.

Check pgbouncer configuration for more information about supported parameters.

Property
Required
Updatable
May Require Restart
Type
Description

Workaround for hugo bug not rendering first table row

databases map[string]map[string]string The pgbouncer.ini (Section [databases]) parameters the configuration contains, represented as an object where the keys are valid names for the pgbouncer.ini configuration file parameters.

Check pgbouncer configuration for more information about supported parameters.

pgbouncer map[string]string The pgbouncer.ini (Section [pgbouncer]) parameters the configuration contains, represented as an object where the keys are valid names for the pgbouncer.ini configuration file parameters.

Check pgbouncer configuration for more information about supported parameters

users map[string]map[string]string The pgbouncer.ini (Section [users]) parameters the configuration contains, represented as an object where the keys are valid names for the pgbouncer.ini configuration file parameters.

Check pgbouncer configuration for more information about supported parameters.

SGPoolingConfig.status

↩ Parent

Property
Required
Updatable
May Require Restart
Type
Description

Workaround for hugo bug not rendering first table row

pgBouncer object Connection pooling configuration status based on PgBouncer.

SGPoolingConfig.status.pgBouncer

↩ Parent

Connection pooling configuration status based on PgBouncer.

Property
Required
Updatable
May Require Restart
Type
Description

Workaround for hugo bug not rendering first table row

defaultParameters map[string]string The pgbouncer.ini default parameters parameters which are used if not set.

Default Values

These are the default values of the pgbouncer.ini property:

  admin_users: "postgres",
  application_name_add_host: "1",
  auth_query: "SELECT usename, passwd FROM pg_shadow WHERE usename=$1",
  auth_type: "md5",
  auth_user: "authenticator",
  default_pool_size: "50",
  ignore_startup_parameters: "extra_float_digits",
  listen_addr: "127.0.0.1",
  max_client_conn: "200",
  max_db_connections: "0",
  max_user_connections: "0",
  pool_mode: "transaction",
  stats_users: "postgres"

Parameter Denylist / Blocklist

To guarantee a functional PgBouncer configuration, most of the parameters specified in the PgBouncer configuration documentation for section pgbouncer are not allowed to be changed. If these are specified in the CR configuration, they will be ignored and the default values will be used instead. The immutable PgBouncer parameters are:

Immutable Parameters
admin_users
application_name_add_host
auth_file
auth_hba_file
auth_query
auth_type
auth_user
client_tls_ca_file
client_tls_cert_file
client_tls_ciphers
client_tls_dheparams
client_tls_ecdhcurve
client_tls_key_file
client_tls_protocols
client_tls_sslmode
conffile
disable_pqexec
dns_max_ttl
dns_nxdomain_ttl
dns_zone_check_period
listen_addr
listen_backlog
listen_port
logfile
pidfile
server_check_delay
server_check_query
server_fast_close
server_lifetime
server_round_robin
server_tls_ca_file
server_tls_cert_file
server_tls_ciphers
server_tls_key_file
server_tls_protocols
server_tls_sslmode
stats_period
stats_users
syslog
syslog_facility
syslog_ident
tcp_defer_accept
tcp_keepalive
tcp_keepcnt
tcp_keepidle
tcp_keepintvl
tcp_socket_buffer
unix_socket_dir
unix_socket_group
unix_socket_mode
user
verbose