-
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
-
The major version of PostgreSQL to use (10, 11, 12, 13, 14).
-
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
-
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
-
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, login permissions. From the postgres docs:
Only roles that have the LOGIN attribute can be used as
the initial role name for a database connection. A role
with the LOGIN attribute can be considered the same as a
“database user”. To create a role with login privilege,
use either:
CREATE ROLE name LOGIN; CREATE USER name;
(CREATE USER is equivalent to CREATE ROLE except that
CREATE USER includes LOGIN by default, while CREATE ROLE
does not.)
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
-
Defines how users authenticate themselves to the server. See the
PostgreSQL documentation for pg_hba.conf
for details on the expected format of this option. By default,
peer based authentication will be used for users connecting
via the Unix socket, and md5 password authentication will be
used for users connecting via TCP. Any added rules will be
inserted above the default rules. If you'd like to replace the
default rules entirely, you can use lib.mkForce
in your
module.
Type
strings concatenated with "\n"
Default
""
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
-
Name of the user to ensure.
-
Ensures that the specified users exist.
The PostgreSQL users will be identified using peer authentication. This authenticates the Unix user with the
same name only, and that without the need for a password.
This option will never delete existing users or remove DB ownership of databases
once granted with ensureDBOwnership = true;
. This means that this must be
cleaned up manually when changing after changing the config in here.
Type
list of (submodule)
Default
[ ]
Example
[
{
name = "nextcloud";
}
{
name = "superuser";
ensureDBOwnership = true;
}
]
Declarations
-
Specifies the number of seconds between status packets sent back to the server.
This allows for easier monitoring of the progress from server.
A value of zero disables the periodic status updates completely,
although an update will still be sent when requested by the server, to avoid timeout disconnect.
Type
signed integer
Default
10
Declarations