From fcc4d9502da4205208a2dabadd75dd5cc102d1a9 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 17 Apr 2026 15:34:43 +0000 Subject: [PATCH] docs(postgresql): clarify work_mem memory allocation semantics in comment Agent-Logs-Url: https://github.com/nextcloud/all-in-one/sessions/0456b491-e148-4d26-9dc9-e1df9bfbf5d0 Co-authored-by: szaimen <42591237+szaimen@users.noreply.github.com> --- Containers/postgresql/start.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Containers/postgresql/start.sh b/Containers/postgresql/start.sh index a23dfaad..483d3436 100644 --- a/Containers/postgresql/start.sh +++ b/Containers/postgresql/start.sh @@ -178,7 +178,9 @@ if [ -f "/var/lib/postgresql/data/postgresql.conf" ]; then sed -i "s|^#effective_cache_size = .*|effective_cache_size = 1GB|" "$PGCONF" sed -i "s|^effective_cache_size = .*|effective_cache_size = 1GB|" "$PGCONF" - # Increase per-operation sort/hash memory to reduce disk spills for file listing and share queries + # Increase per-operation sort/hash memory to reduce disk spills for file listing and share queries. + # Note: this is allocated per sort/hash operation, not per connection, so the theoretical worst-case + # (max_connections × work_mem) is rarely approached in practice. sed -i "s|^#work_mem = .*|work_mem = 16MB|" "$PGCONF" sed -i "s|^work_mem = .*|work_mem = 16MB|" "$PGCONF"