Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitbcb8f96

Browse files
committed
Improve documentation around autovacuum-related storage parameters.
These were discussed in three different sections of the manual, whichunsurprisingly had diverged over time; and the descriptions of individualvariables lacked stylistic consistency even within each section (andfrequently weren't in very good English anyway). Clean up the mess, andremove some of the redundant information in hopes that future additionswill be less likely to re-introduce inconsistency. For instance I seeno need for maintenance.sgml to include its very own list of all theautovacuum storage parameters, especially since that list was alreadyincomplete.
1 parent0819778 commitbcb8f96

File tree

3 files changed

+106
-116
lines changed

3 files changed

+106
-116
lines changed

‎doc/src/sgml/config.sgml

Lines changed: 35 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -5180,8 +5180,10 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv;
51805180

51815181
<para>
51825182
These settings control the behavior of the <firstterm>autovacuum</>
5183-
feature. Refer to <xref linkend="autovacuum"> for
5184-
more information.
5183+
feature. Refer to <xref linkend="autovacuum"> for more information.
5184+
Note that many of these settings can be overridden on a per-table
5185+
basis; see <xref linkend="sql-createtable-storage-parameters"
5186+
endterm="sql-createtable-storage-parameters-title">.
51855187
</para>
51865188

51875189
<variablelist>
@@ -5199,7 +5201,8 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv;
51995201
<xref linkend="guc-track-counts"> must also be enabled for
52005202
autovacuum to work.
52015203
This parameter can only be set in the <filename>postgresql.conf</>
5202-
file or on the server command line.
5204+
file or on the server command line; however, autovacuuming can be
5205+
disabled for individual tables by changing table storage parameters.
52035206
</para>
52045207
<para>
52055208
Note that even when this parameter is disabled, the system
@@ -5227,8 +5230,10 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv;
52275230
set to any value other than <literal>-1</literal>, a message will be
52285231
logged if an autovacuum action is skipped due to the existence of a
52295232
conflicting lock. Enabling this parameter can be helpful
5230-
in tracking autovacuum activity. This setting can only be set in
5231-
the <filename>postgresql.conf</> file or on the server command line.
5233+
in tracking autovacuum activity. This parameter can only be set in
5234+
the <filename>postgresql.conf</> file or on the server command line;
5235+
but the setting can be overridden for individual tables by
5236+
changing table storage parameters.
52325237
</para>
52335238
</listitem>
52345239
</varlistentry>
@@ -5242,7 +5247,7 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv;
52425247
<listitem>
52435248
<para>
52445249
Specifies the maximum number of autovacuum processes (other than the
5245-
autovacuum launcher)which may be running at any one time. The default
5250+
autovacuum launcher)that may be running at any one time. The default
52465251
is three. This parameter can only be set at server start.
52475252
</para>
52485253
</listitem>
@@ -5279,9 +5284,9 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv;
52795284
to trigger a <command>VACUUM</> in any one table.
52805285
The default is 50 tuples.
52815286
This parameter can only be set in the <filename>postgresql.conf</>
5282-
file or on the server command line.
5283-
This setting can be overridden for individual tables by
5284-
changing storage parameters.
5287+
file or on the server command line;
5288+
but the setting can be overridden for individual tables by
5289+
changingtablestorage parameters.
52855290
</para>
52865291
</listitem>
52875292
</varlistentry>
@@ -5298,9 +5303,9 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv;
52985303
needed to trigger an <command>ANALYZE</> in any one table.
52995304
The default is 50 tuples.
53005305
This parameter can only be set in the <filename>postgresql.conf</>
5301-
file or on the server command line.
5302-
This setting can be overridden for individual tables by
5303-
changing storage parameters.
5306+
file or on the server command line;
5307+
but the setting can be overridden for individual tables by
5308+
changingtablestorage parameters.
53045309
</para>
53055310
</listitem>
53065311
</varlistentry>
@@ -5318,9 +5323,9 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv;
53185323
when deciding whether to trigger a <command>VACUUM</>.
53195324
The default is 0.2 (20% of table size).
53205325
This parameter can only be set in the <filename>postgresql.conf</>
5321-
file or on the server command line.
5322-
This setting can be overridden for individual tables by
5323-
changing storage parameters.
5326+
file or on the server command line;
5327+
but the setting can be overridden for individual tables by
5328+
changingtablestorage parameters.
53245329
</para>
53255330
</listitem>
53265331
</varlistentry>
@@ -5338,9 +5343,9 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv;
53385343
when deciding whether to trigger an <command>ANALYZE</>.
53395344
The default is 0.1 (10% of table size).
53405345
This parameter can only be set in the <filename>postgresql.conf</>
5341-
file or on the server command line.
5342-
This setting can be overridden for individual tables by
5343-
changing storage parameters.
5346+
file or on the server command line;
5347+
but the setting can be overridden for individual tables by
5348+
changingtablestorage parameters.
53445349
</para>
53455350
</listitem>
53465351
</varlistentry>
@@ -5367,7 +5372,7 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv;
53675372
is a relatively low 200 million transactions.
53685373
This parameter can only be set at server start, but the setting
53695374
can be reduced for individual tables by
5370-
changing storage parameters.
5375+
changingtablestorage parameters.
53715376
For more information see <xref linkend="vacuum-for-wraparound">.
53725377
</para>
53735378
</listitem>
@@ -5394,8 +5399,8 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv;
53945399
<filename>pg_multixact/members</> and <filename>pg_multixact/offsets</>
53955400
subdirectories, which is why the default is a relatively low
53965401
400 million multixacts.
5397-
This parameter can only be set at server start, but the setting
5398-
canbe reduced for individual tables by changing storage parameters.
5402+
This parameter can only be set at server start, but the setting can
5403+
be reduced for individual tables by changing table storage parameters.
53995404
For more information see <xref linkend="vacuum-for-multixact-wraparound">.
54005405
</para>
54015406
</listitem>
@@ -5414,9 +5419,9 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv;
54145419
<xref linkend="guc-vacuum-cost-delay"> value will be used.
54155420
The default value is 20 milliseconds.
54165421
This parameter can only be set in the <filename>postgresql.conf</>
5417-
file or on the server command line.
5418-
This setting can be overridden for individual tables by
5419-
changing storage parameters.
5422+
file or on the server command line;
5423+
but the setting can be overridden for individual tables by
5424+
changingtablestorage parameters.
54205425
</para>
54215426
</listitem>
54225427
</varlistentry>
@@ -5434,12 +5439,12 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv;
54345439
default), the regular
54355440
<xref linkend="guc-vacuum-cost-limit"> value will be used. Note that
54365441
the value is distributed proportionally among the running autovacuum
5437-
workers, if there is more than one, so that the sum of the limitsof
5438-
each workernever exceedsthelimit on this variable.
5442+
workers, if there is more than one, so that the sum of the limitsfor
5443+
each workerdoes not exceedthevalue of this variable.
54395444
This parameter can only be set in the <filename>postgresql.conf</>
5440-
file or on the server command line.
5441-
This setting can be overridden for individual tables by
5442-
changing storage parameters.
5445+
file or on the server command line;
5446+
but the setting can be overridden for individual tables by
5447+
changingtablestorage parameters.
54435448
</para>
54445449
</listitem>
54455450
</varlistentry>
@@ -6018,7 +6023,7 @@ SET XML OPTION { DOCUMENT | CONTENT };
60186023
the entries in it to the main GIN data structure in bulk.
60196024
The default is four megabytes (<literal>4MB</>). This setting
60206025
can be overridden for individual GIN indexes by changing
6021-
storage parameters.
6026+
indexstorage parameters.
60226027
See <xref linkend="gin-fast-update"> and <xref linkend="gin-tips">
60236028
for more information.
60246029
</para>

‎doc/src/sgml/maintenance.sgml

Lines changed: 16 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -705,15 +705,15 @@ HINT: Stop the postmaster and vacuum that database in single-user mode.
705705
the next database will be processed as soon as the first worker finishes.
706706
Each worker process will check each table within its database and
707707
execute <command>VACUUM</> and/or <command>ANALYZE</> as needed.
708-
<varname>log_autovacuum_min_duration</varname> can beused to monitor
709-
autovacuum activity.
708+
<xref linkend="guc-log-autovacuum-min-duration"> can beset to monitor
709+
autovacuumworkers'activity.
710710
</para>
711711

712712
<para>
713713
If several large tables all become eligible for vacuuming in a short
714714
amount of time, all autovacuum workers might become occupied with
715715
vacuuming those tables for a long period. This would result
716-
in other tables and databases not being vacuumed until a workerbecame
716+
in other tables and databases not being vacuumed until a workerbecomes
717717
available. There is no limit on how many workers might be in a
718718
single database, but workers do try to avoid repeating work that has
719719
already been done by other workers. Note that the number of running
@@ -767,45 +767,24 @@ analyze threshold = analyze base threshold + analyze scale factor * number of tu
767767
<para>
768768
The default thresholds and scale factors are taken from
769769
<filename>postgresql.conf</filename>, but it is possible to override them
770-
on atable-by-table basis; see
770+
(and many other autovacuum control parameters)on aper-table basis; see
771771
<xref linkend="sql-createtable-storage-parameters"
772772
endterm="sql-createtable-storage-parameters-title"> for more information.
773-
If a setting
774-
has been changed via storage parameters, that value is used; otherwise the
775-
global settings are used. See <xref linkend="runtime-config-autovacuum"> for
776-
more details on the global settings.
777-
</para>
778-
779-
<para>
780-
Besides the base threshold values and scale factors, there are six
781-
more autovacuum parameters that can be set for each table via
782-
storage parameters.
783-
The first parameter, <literal>autovacuum_enabled</>,
784-
can be set to <literal>false</literal> to instruct the autovacuum daemon
785-
to skip that particular table entirely. In this case
786-
autovacuum will only touch the table if it must do so
787-
to prevent transaction ID wraparound.
788-
Another two parameters,
789-
<varname>autovacuum_vacuum_cost_delay</> and
790-
<varname>autovacuum_vacuum_cost_limit</>, are used to set
791-
table-specific values for the cost-based vacuum delay feature
792-
(see <xref linkend="runtime-config-resource-vacuum-cost">).
793-
<varname>autovacuum_freeze_min_age</>,
794-
<varname>autovacuum_freeze_max_age</> and
795-
<varname>autovacuum_freeze_table_age</> are used to set
796-
values for <xref linkend="guc-vacuum-freeze-min-age">,
797-
<xref linkend="guc-autovacuum-freeze-max-age"> and
798-
<xref linkend="guc-vacuum-freeze-table-age"> respectively.
799-
</para>
800-
801-
<para>
802-
When multiple workers are running, the cost delay parameters are
773+
If a setting has been changed via a table's storage parameters, that value
774+
is used when processing that table; otherwise the global settings are
775+
used. See <xref linkend="runtime-config-autovacuum"> for more details on
776+
the global settings.
777+
</para>
778+
779+
<para>
780+
When multiple workers are running, the autovacuum cost delay parameters
781+
(see <xref linkend="runtime-config-resource-vacuum-cost">) are
803782
<quote>balanced</quote> among all the running workers, so that the
804783
total I/O impact on the system is the same regardless of the number
805784
of workers actually running. However, any workers processing tables whose
806-
<literal>autovacuum_vacuum_cost_delay</> or
807-
<literal>autovacuum_vacuum_cost_limit</> have been set are not considered
808-
in the balancing algorithm.
785+
per-table<literal>autovacuum_vacuum_cost_delay</> or
786+
<literal>autovacuum_vacuum_cost_limit</>storage parametershave been set
787+
are not consideredin the balancing algorithm.
809788
</para>
810789
</sect2>
811790
</sect1>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp