Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 28915c7

Browse files
Add note about diskspace usage of pg_commit_ts
Author: Thomas Munro
1 parent 7610547 commit 28915c7

File tree

1 file changed

+17
-13
lines changed

1 file changed

+17
-13
lines changed

doc/src/sgml/maintenance.sgml

+17-13
Original file line numberDiff line numberDiff line change
@@ -526,19 +526,23 @@
526526

527527
<para>
528528
The sole disadvantage of increasing <varname>autovacuum_freeze_max_age</>
529-
(and <varname>vacuum_freeze_table_age</> along with it)
530-
is that the <filename>pg_xact</> subdirectory of the database cluster
531-
will take more space, because it must store the commit status of all
532-
transactions back to the <varname>autovacuum_freeze_max_age</> horizon.
533-
The commit status uses two bits per transaction, so if
534-
<varname>autovacuum_freeze_max_age</> is set to its maximum allowed
535-
value of two billion, <filename>pg_xact</> can be expected to
536-
grow to about half a gigabyte. If this is trivial compared to your
537-
total database size, setting <varname>autovacuum_freeze_max_age</> to
538-
its maximum allowed value is recommended. Otherwise, set it depending
539-
on what you are willing to allow for <filename>pg_xact</> storage.
540-
(The default, 200 million transactions, translates to about 50MB of
541-
<filename>pg_xact</> storage.)
529+
(and <varname>vacuum_freeze_table_age</> along with it) is that
530+
the <filename>pg_xact</> and <filename>pg_commit_ts</filename>
531+
subdirectories of the database cluster will take more space, because it
532+
must store the commit status and (if <varname>track_commit_timestamp</> is
533+
enabled) timestamp of all transactions back to
534+
the <varname>autovacuum_freeze_max_age</> horizon. The commit status uses
535+
two bits per transaction, so if
536+
<varname>autovacuum_freeze_max_age</> is set to its maximum allowed value
537+
of two billion, <filename>pg_xact</> can be expected to grow to about half
538+
a gigabyte and <filename>pg_commit_ts</filename> to about 20GB. If this
539+
is trivial compared to your total database size,
540+
setting <varname>autovacuum_freeze_max_age</> to its maximum allowed value
541+
is recommended. Otherwise, set it depending on what you are willing to
542+
allow for <filename>pg_xact</> and <filename>pg_commit_ts</> storage.
543+
(The default, 200 million transactions, translates to about 50MB
544+
of <filename>pg_xact</> storage and about 2GB of <filename>pg_commit_ts</>
545+
storage.)
542546
</para>
543547

544548
<para>

0 commit comments

Comments
 (0)