SGPostgresConfig

A PostgreSQL configuration CR represent the configuration of a specific PostgreSQL major version.

Have a look at postgresqlco.nf to help you tune and optimize your PostgreSQL configuration.


Kind: SGPostgresConfig

listKind: SGPostgresConfigList

plural: sgpgconfigs

singular: sgpgconfig


Spec

Property Required Updatable Type Default Description
postgresVersion string 12

The major Postgres version the configuration is for. Postgres major versions contain one number starting with version 10 (10, 11, 12, etc), and two numbers separated by a dot for previous versions (9.6, 9.5, etc).

Note that Postgres maintains full compatibility across minor versions, and hence a configuration for a given major version will work for any minor version of that same major version.

Check StackGres component versions to see the Postgres versions supported by this version of StackGres.

postgresql.conf object see below
The postgresql.conf parameters the configuration contains, represented as an object where the keys are valid names for the postgresql.conf configuration file parameters of the given postgresVersion. You may check postgresqlco.nf as a reference on how to tune and find the valid parameters for a given major version.

Default value of postgresql.conf property:

checkpoint_completion_target: "0.9"
checkpoint_timeout: 15min
default_statistics_target: "250"
extra_float_digits: "1"
huge_pages: "off"
lc_messages: C
random_page_cost: "2.0"
shared_preload_libraries: pg_stat_statements
track_activity_query_size: "2048"
track_functions: pl
track_io_timing: "on"
wal_compression: "on"

Example:

apiVersion: stackgres.io/v1beta1
kind: SGPostgresConfig
metadata:
  name: postgresconf
spec:
  postgresVersion: "11"
  postgresql.conf:
    password_encryption: 'scram-sha-256'
    random_page_cost: '1.5'
    shared_buffers: '256MB'
    wal_compression: 'on'

To guarantee a functional postgres configuration some of the parameters specified in postgres configuration documentation have been blacklisted and will be ignored. The parameters that will be ignored are:

Blacklisted parameter
listen_addresses
port
cluster_name
hot_standby
fsync
full_page_writes
log_destination
logging_collector
max_replication_slots
max_wal_senders
wal_keep_segments
wal_level
wal_log_hints
archive_mode
archive_command