diff options
Diffstat (limited to 'src/backend/utils/misc')
-rw-r--r-- | src/backend/utils/misc/guc.c | 15 | ||||
-rw-r--r-- | src/backend/utils/misc/postgresql.conf.sample | 5 |
2 files changed, 20 insertions, 0 deletions
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c index 72e93107910..3b33549a571 100644 --- a/src/backend/utils/misc/guc.c +++ b/src/backend/utils/misc/guc.c @@ -425,6 +425,8 @@ int log_min_duration_statement = -1; int log_temp_files = -1; int trace_recovery_messages = LOG; +int temp_file_limit = -1; + int num_temp_buffers = 1024; char *data_directory; @@ -535,6 +537,8 @@ const char *const config_group_names[] = gettext_noop("Resource Usage"), /* RESOURCES_MEM */ gettext_noop("Resource Usage / Memory"), + /* RESOURCES_DISK */ + gettext_noop("Resource Usage / Disk"), /* RESOURCES_KERNEL */ gettext_noop("Resource Usage / Kernel Resources"), /* RESOURCES_VACUUM_DELAY */ @@ -1694,6 +1698,17 @@ static struct config_int ConfigureNamesInt[] = }, { + {"temp_file_limit", PGC_SUSET, RESOURCES_DISK, + gettext_noop("Limits the total size of all temp files used by each session."), + gettext_noop("-1 means no limit."), + GUC_UNIT_KB + }, + &temp_file_limit, + -1, -1, INT_MAX, + NULL, NULL, NULL + }, + + { {"vacuum_cost_page_hit", PGC_USERSET, RESOURCES_VACUUM_DELAY, gettext_noop("Vacuum cost for a page found in the buffer cache."), NULL diff --git a/src/backend/utils/misc/postgresql.conf.sample b/src/backend/utils/misc/postgresql.conf.sample index 940329377a4..fa67e7a3d5c 100644 --- a/src/backend/utils/misc/postgresql.conf.sample +++ b/src/backend/utils/misc/postgresql.conf.sample @@ -119,6 +119,11 @@ #maintenance_work_mem = 16MB # min 1MB #max_stack_depth = 2MB # min 100kB +# - Disk - + +#temp_file_limit = -1 # limits per-session temp file space + # in kB, or -1 for no limit + # - Kernel Resource Usage - #max_files_per_process = 1000 # min 25 |