From 7a70f11920fac103252f666ec08916438448a8d1 Mon Sep 17 00:00:00 2001 From: Leona Maroni Date: Sat, 15 Aug 2026 15:31:11 +0200 Subject: [PATCH] nixos/gitlab: increase postgres max locks per transaction Apparently this is necessary since the PostgreSQL 17.6 update (cherry picked from commit 917ec3b1c2817cbb949e16edda7ed0da0e2bacc6) --- nixos/modules/services/misc/gitlab/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nixos/modules/services/misc/gitlab/default.nix b/nixos/modules/services/misc/gitlab/default.nix index 81008a92d9e0..b66cd0bd188e 100644 --- a/nixos/modules/services/misc/gitlab/default.nix +++ b/nixos/modules/services/misc/gitlab/default.nix @@ -1285,6 +1285,8 @@ in services.postgresql = optionalAttrs databaseActuallyCreateLocally { enable = true; ensureUsers = singleton { name = cfg.databaseUsername; }; + # With the PostgreSQL update to 17.6, the default was no longer enough. + settings.max_locks_per_transaction = lib.mkDefault 128; }; # Enable rotation of log files