add max connection

This commit is contained in:
Jeffrey C. Ollie 2023-05-24 13:51:18 -05:00
parent 4dec0d25ae
commit ed882a6b26
Signed by: jeff
GPG key ID: 6F86035A6D97044E

View file

@ -60,6 +60,10 @@
type = lib.types.port;
default = 5432;
};
maxConnections = lib.options.mkOption {
type = lib.types.ints.positive;
default = 100;
};
superuser = lib.options.mkOption {
type = lib.types.submodule {
options = {
@ -92,9 +96,6 @@
passwordFile = lib.options.mkOption {
type = lib.types.path;
};
# password = lib.options.mkOption {
# type = lib.types.str;
# };
primary = lib.options.mkOption {
type = lib.types.submodule {
options = {
@ -462,8 +463,8 @@
# log_statement = "all";
log_timezone = "America/Chicago";
logging_collector = "off";
max_connections = 100;
max_wal_senders = "3";
max_connections = cfg.maxConnections;
max_wal_senders = 3;
max_wal_size = "1GB";
min_wal_size = "80MB";
password_encryption = "scram-sha-256";