Raise default PostgreSQL shared buffers minimum to 256 MB
What does this MR do?
This backports !7860 (merged) to 17-3-stable
.
Previously the Docker container set the PostgreSQL shared buffers to a minimum of 1 MB to avoid using the default of 25% of the node's memory. While that meager value worked previously, this value is not only overly conservative but it is now insufficient for background migrations that have a large number of partitioned tables.
From
#8682 (comment 2058612975)
we see that the 2 years of audit_events
needs about 20 MB just to
query the table metadata. The 1 MB value failed with no unpinned buffers available
because PostgreSQL needs more shared buffers for
query planning.
Raise the default to 256 MB to provide enough headroom for future tables and to ensure PostgreSQL effectively caches data. Update the documentation in the template accordingly.
Related issues
Relates to #8682 (closed)
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
This MR is backporting a bug fix, documentation update, or spec fix, previously merged in the default branch. -
The original MR has been deployed to GitLab.com (not applicable for documentation or spec changes). -
This MR has a severity label assigned (if applicable).
Note to the merge request author and maintainer
The process of backporting bug fixes into stable branches is tracked as part of an internal pilot. If you have questions about this process, please:
- Refer to the internal pilot issue for feedback or questions.
- Refer to the patch release runbook for engineers and maintainers for guidance.