-
List of PostgreSQL plugins. PostgreSQL version for each plugin should
match version for services.postgresql.package
value.
Type
list of path
Default
[ ]
Example
with pkgs.postgresql_15.pkgs; [ 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
-
The major version of PostgreSQL to use (10, 11, 12, 13, 14).
-
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
-
Whether to enable local postgresql integration.
Type
boolean
Default
false
Example
true
Declarations
-
Whether to enable PostgreSQL Server.
Type
boolean
Default
false
Example
true
Declarations
-
Whether to enable PostgreSQL dumps.
Type
boolean
Default
false
Example
true
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
-
An attrset of clauses to grant to the user. Under the hood this uses the
ALTER USER syntax for each attrName where
the attrValue is true in the attrSet:
ALTER USER user.name WITH attrName
Type
submodule
Default
The default, null
, means that the user created will have the default permissions assigned by PostgreSQL. Subsequent server starts will not set or unset the clause, so imperative changes are preserved.
Example
{
superuser = true;
createrole = true;
createdb = true;
}
Declarations
-
PostgreSQL database name for the paste.sr.ht service,
used if is true
.
Type
string
Default
"paste.sr.ht"
Declarations
-
Whether to enable JIT support.
Type
boolean
Default
false
Example
true
Declarations
-
Grants the user ownership to a database with the same name.
This database must be defined manually in
.
Type
boolean
Default
false
Declarations
-
Require {command}pg_receivewal
to use an existing replication slot (see
Section 26.2.6 of the PostgreSQL manual).
When this option is used, {command}pg_receivewal
will report a flush position to the server,
indicating when each segment has been synchronized to disk so that the server can remove that segment if it is not otherwise needed.
When the replication client of {command}pg_receivewal
is configured on the server as a synchronous standby,
then using a replication slot will report the flush position to the server, but only when a WAL file is closed.
Therefore, that configuration will cause transactions on the primary to wait for a long time and effectively not work satisfactorily.
The option {option}synchronous
must be specified in addition to make this work correctly.
Type
string
Default
""
Example
"some_slot_name"
Declarations