-
List of PostgreSQL plugins.
Type
(function that evaluates to a(n) list of path) or (list of path) convertible to it
Default
Example
ps: with ps; [ postgis pg_repack ]
Declarations
-
Whether to enable Automatically migrate old data dir when major version of PostgreSQL
changes, using fc-postgresql/pg_upgrade.
The old data dir will be kept and has to be removed manually later.
You can run sudo -u postgres fc-postgresql prepare-autoupgrade
to
create the new data dir before upgrading PostgreSQL to reduce downtime
and the risk of failure. You have to add databases to expectedDatabases
or disable checkExpectedDatabases
to make this work.
.
Type
boolean
Default
false
Example
true
Declarations
-
Whether to enable Enable preconfigured PostgreSQL.
Type
boolean
Default
false
Example
true
Declarations
-
Check that only the databases specified by expectedDatabases
(and the standard internal databases) are present.
This is enabled by default and prevents auto-upgrades affecting
unexpected databases.
Type
boolean
Default
true
Declarations
-
List of databases that are expected to be present before upgrading.
If more databases are found, the upgrade will not run.
Type
list of string
Default
[ ]
Declarations
-
The major version of PostgreSQL to use (10, 11, 12, 13, 14).
-
Whether to enable PostgreSQL Server.
Type
boolean
Default
false
Example
true
Declarations
-
Whether to enable local postgresql integration.
Type
boolean
Default
false
Example
true
Declarations
-
Whether to enable PostgreSQL dumps.
Type
boolean
Default
false
Example
true
Declarations
-
Grants the user, created by the ensureUser attr, superuser permissions. From the postgres docs:
A database superuser bypasses all permission checks,
except the right to log in. This is a dangerous privilege
and should not be used carelessly; it is best to do most
of your work as a role that is not a superuser. To create
a new database superuser, use CREATE ROLE name SUPERUSER.
You must do this as a role that is already a superuser.
More information on postgres roles can be found here
Type
null or boolean
Default
null
: do not set. For newly created roles, use PostgreSQL's default. For existing roles, do not touch this clause.
Declarations
-
PostgreSQL configuration. Refer to
https://www.postgresql.org/docs/current/config-setting.html#CONFIG-SETTING-CONFIGURATION-FILE
for an overview of postgresql.conf
.
::: {.note}
String values will automatically be enclosed in single quotes. Single quotes will be
escaped with two single quotes as described by the upstream documentation linked above.
:::
Type
attribute set of (boolean or floating point number or signed integer or string)
Default
{ }
Example
{
log_connections = true;
log_statement = "all";
logging_collector = true;
log_disconnections = true;
log_destination = lib.mkForce "syslog";
}
Declarations
-
PostgreSQL database name for the builds.sr.ht service,
used if is true
.
Type
string
Default
"builds.sr.ht"
Declarations
-
Backup all databases using pg_dumpall.
This option is mutual exclusive to
services.postgresqlBackup.databases
.
The resulting backup dump will have the name all.sql.gz.
This option is the default if no databases are specified.
Type
boolean
Default
services.postgresqlBackup.databases == []
Declarations
-
Specifies parameters used to connect to the server, as a connection string.
See Section 34.1.1 of the PostgreSQL manual for more information.
Because {command}pg_receivewal
doesn't connect to any particular database in the cluster,
database name in the connection string will be ignored.
Type
string
Example
"postgresql://user@somehost"
Declarations
-
The data directory for PostgreSQL. If left as the default value
this directory will automatically be created before the PostgreSQL server starts, otherwise
the sysadmin is responsible for ensuring the directory exists with appropriate ownership
and permissions.
Type
path
Default
"/var/lib/postgresql/${config.services.patroni.postgresqlPackage.psqlSchema}"
Example
"/var/lib/postgresql/14"
Declarations