Cookbooks
postgresql
documentation
Postgresql Config

postgresql_config

Back to resource list

This resource manages the postgresql.conf configuration file.

Requires

  • deepsort

Uses

Actions

  • :create
  • :delete

Properties

NameName?TypeDefaultDescriptionAllowed Values
config_fileString
sourceString
versionString, IntegerPostgreSQL installed version override
data_directoryStringPostgreSQL server data directory
hba_fileStringPostgreSQL pg_hba.conf file location
ident_fileStringPostgreSQL pg_ident.conf file location
external_pid_fileStringPostgreSQL external PID file location
server_configHashPostgreSQL server configuration options

Examples

Setup the PostgreSQL configuration with a specific data directory:

Note: If you have installed a specific version of PostgreSQL (different from the default version), you must specify that version in this resource too

postgresql_server_conf 'My PostgreSQL Config' do
  version '15'
  data_directory '/data/postgresql/15/main'
  notifies :reload, 'postgresql_service[postgresql]'
end