mirror of
https://github.com/postgres/postgres.git
synced 2025-04-24 10:47:04 +03:00
Increase work_mem and maintenance_work_mem defaults by 4x
New defaults are 4MB and 64MB.
This commit is contained in:
parent
6f14a6f703
commit
848ae330a4
@ -1213,7 +1213,7 @@ include 'filename'
|
|||||||
<para>
|
<para>
|
||||||
Specifies the amount of memory to be used by internal sort operations
|
Specifies the amount of memory to be used by internal sort operations
|
||||||
and hash tables before writing to temporary disk files. The value
|
and hash tables before writing to temporary disk files. The value
|
||||||
defaults to one megabyte (<literal>1MB</>).
|
defaults to four megabytes (<literal>4MB</>).
|
||||||
Note that for a complex query, several sort or hash operations might be
|
Note that for a complex query, several sort or hash operations might be
|
||||||
running in parallel; each operation will be allowed to use as much memory
|
running in parallel; each operation will be allowed to use as much memory
|
||||||
as this value specifies before it starts to write data into temporary
|
as this value specifies before it starts to write data into temporary
|
||||||
@ -1239,7 +1239,7 @@ include 'filename'
|
|||||||
Specifies the maximum amount of memory to be used by maintenance
|
Specifies the maximum amount of memory to be used by maintenance
|
||||||
operations, such as <command>VACUUM</command>, <command>CREATE
|
operations, such as <command>VACUUM</command>, <command>CREATE
|
||||||
INDEX</>, and <command>ALTER TABLE ADD FOREIGN KEY</>. It defaults
|
INDEX</>, and <command>ALTER TABLE ADD FOREIGN KEY</>. It defaults
|
||||||
to 16 megabytes (<literal>16MB</>). Since only one of these
|
to 64 megabytes (<literal>64MB</>). Since only one of these
|
||||||
operations can be executed at a time by a database session, and
|
operations can be executed at a time by a database session, and
|
||||||
an installation normally doesn't have many of them running
|
an installation normally doesn't have many of them running
|
||||||
concurrently, it's safe to set this value significantly larger
|
concurrently, it's safe to set this value significantly larger
|
||||||
|
@ -1773,7 +1773,7 @@ static struct config_int ConfigureNamesInt[] =
|
|||||||
GUC_UNIT_KB
|
GUC_UNIT_KB
|
||||||
},
|
},
|
||||||
&work_mem,
|
&work_mem,
|
||||||
1024, 64, MAX_KILOBYTES,
|
4096, 64, MAX_KILOBYTES,
|
||||||
NULL, NULL, NULL
|
NULL, NULL, NULL
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -1784,7 +1784,7 @@ static struct config_int ConfigureNamesInt[] =
|
|||||||
GUC_UNIT_KB
|
GUC_UNIT_KB
|
||||||
},
|
},
|
||||||
&maintenance_work_mem,
|
&maintenance_work_mem,
|
||||||
16384, 1024, MAX_KILOBYTES,
|
65536, 1024, MAX_KILOBYTES,
|
||||||
NULL, NULL, NULL
|
NULL, NULL, NULL
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -124,8 +124,8 @@
|
|||||||
# per transaction slot, plus lock space (see max_locks_per_transaction).
|
# per transaction slot, plus lock space (see max_locks_per_transaction).
|
||||||
# It is not advisable to set max_prepared_transactions nonzero unless you
|
# It is not advisable to set max_prepared_transactions nonzero unless you
|
||||||
# actively intend to use prepared transactions.
|
# actively intend to use prepared transactions.
|
||||||
#work_mem = 1MB # min 64kB
|
#work_mem = 4MB # min 64kB
|
||||||
#maintenance_work_mem = 16MB # min 1MB
|
#maintenance_work_mem = 64MB # min 1MB
|
||||||
#autovacuum_work_mem = -1 # min 1MB, or -1 to use maintenance_work_mem
|
#autovacuum_work_mem = -1 # min 1MB, or -1 to use maintenance_work_mem
|
||||||
#max_stack_depth = 2MB # min 100kB
|
#max_stack_depth = 2MB # min 100kB
|
||||||
#dynamic_shared_memory_type = posix # the default is the first option
|
#dynamic_shared_memory_type = posix # the default is the first option
|
||||||
|
Loading…
x
Reference in New Issue
Block a user