diff options
| author | Alexander Korotkov | 2023-11-28 23:41:48 +0000 |
|---|---|---|
| committer | Alexander Korotkov | 2023-11-28 23:41:48 +0000 |
| commit | 2cdf131c46e631addfc386f6106e52a1b8cc3a70 (patch) | |
| tree | 5faf24c559be725f691b135118f20988f71c6bc1 /src/backend/utils | |
| parent | 4ed8f0913bfdb5f3551de3c27fc2c2e880abc5a2 (diff) | |
Use larger segment file names for pg_notify
This avoids the wraparound in async.c and removes the corresponding code
complexity. The maximum amount of allocated SLRU pages for NOTIFY / LISTEN
queue is now determined by the max_notify_queue_pages GUC. The default
value is 1048576. It allows to consume up to 8 GB of disk space which is
exactly the limit we had previously.
Author: Maxim Orlov, Aleksander Alekseev, Alexander Korotkov, Teodor Sigaev
Author: Nikita Glukhov, Pavel Borisov, Yura Sokolov
Reviewed-by: Jacob Champion, Heikki Linnakangas, Alexander Korotkov
Reviewed-by: Japin Li, Pavel Borisov, Tom Lane, Peter Eisentraut, Andres Freund
Reviewed-by: Andrey Borodin, Dilip Kumar, Aleksander Alekseev
Discussion: https://postgr.es/m/CACG%3DezZe1NQSCnfHOr78AtAZxJZeCvxrts0ygrxYwe%3DpyyjVWA%40mail.gmail.com
Discussion: https://postgr.es/m/CAJ7c6TPDOYBYrnCAeyndkBktO0WG2xSdYduTF0nxq%2BvfkmTF5Q%40mail.gmail.com
Diffstat (limited to 'src/backend/utils')
| -rw-r--r-- | src/backend/utils/misc/guc_tables.c | 10 | ||||
| -rw-r--r-- | src/backend/utils/misc/postgresql.conf.sample | 3 |
2 files changed, 13 insertions, 0 deletions
diff --git a/src/backend/utils/misc/guc_tables.c b/src/backend/utils/misc/guc_tables.c index b764ef69980..5c6f5af8736 100644 --- a/src/backend/utils/misc/guc_tables.c +++ b/src/backend/utils/misc/guc_tables.c @@ -2688,6 +2688,16 @@ struct config_int ConfigureNamesInt[] = }, { + {"max_notify_queue_pages", PGC_POSTMASTER, RESOURCES_DISK, + gettext_noop("Sets the maximum number of allocated pages for NOTIFY / LISTEN queue."), + NULL, + }, + &max_notify_queue_pages, + 1048576, 64, INT_MAX, + NULL, NULL, NULL + }, + + { {"wal_decode_buffer_size", PGC_POSTMASTER, WAL_RECOVERY, gettext_noop("Buffer size for reading ahead in the WAL during recovery."), gettext_noop("Maximum distance to read ahead in the WAL to prefetch referenced data blocks."), diff --git a/src/backend/utils/misc/postgresql.conf.sample b/src/backend/utils/misc/postgresql.conf.sample index e48c066a5b1..cf9f283cfee 100644 --- a/src/backend/utils/misc/postgresql.conf.sample +++ b/src/backend/utils/misc/postgresql.conf.sample @@ -166,6 +166,9 @@ #temp_file_limit = -1 # limits per-process temp file space # in kilobytes, or -1 for no limit +#max_notify_queue_pages = 1048576 # limits the number of SLRU pages allocated + # for NOTIFY / LISTEN queue + # - Kernel Resources - #max_files_per_process = 1000 # min 64 |
