From 07064a1311188d8fc950bc1d81844971af5a6421 Mon Sep 17 00:00:00 2001 From: Jiri Popelka Date: Thu, 9 Jun 2022 10:53:55 +0200 Subject: [PATCH] Update description of POSTGRESQL_SHARED_BUFFERS & POSTGRESQL_EFFECTIVE_CACHE_SIZE default values The previous description was not completely correct, because when the container is run in Kubernetes/Openshift, the default values are calculated: https://github.com/sclorg/postgresql-container/blob/master/src/root/usr/share/container-scripts/postgresql/common.sh#L12 based on memory limit: https://github.com/sclorg/container-common-scripts/blob/master/shared-scripts/core/usr/bin/cgroup-limits --- src/root/usr/share/container-scripts/postgresql/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/root/usr/share/container-scripts/postgresql/README.md b/src/root/usr/share/container-scripts/postgresql/README.md index bc01aa9f..5c24050f 100644 --- a/src/root/usr/share/container-scripts/postgresql/README.md +++ b/src/root/usr/share/container-scripts/postgresql/README.md @@ -95,10 +95,10 @@ The following environment variables influence the PostgreSQL configuration file. **`POSTGRESQL_MAX_PREPARED_TRANSACTIONS (default: 0)`** Sets the maximum number of transactions that can be in the "prepared" state. If you are using prepared transactions, you will probably want this to be at least as large as max_connections -**`POSTGRESQL_SHARED_BUFFERS (default: 32M)`** +**`POSTGRESQL_SHARED_BUFFERS (default: 1/4 of memory limit or 32M)`** Sets how much memory is dedicated to PostgreSQL to use for caching data -**`POSTGRESQL_EFFECTIVE_CACHE_SIZE (default: 128M)`** +**`POSTGRESQL_EFFECTIVE_CACHE_SIZE (default: 1/2 of memory limit or 128M)`** Set to an estimate of how much memory is available for disk caching by the operating system and within the database itself