summaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorHeikki Linnakangas2025-12-09 11:53:03 +0000
committerHeikki Linnakangas2025-12-09 11:53:03 +0000
commitbd8d9c9bdfa0c2168bb37edca6fa88168cacbbaa (patch)
tree3e33ea3306b47501b75a1b5545598c1f217ff377 /doc/src
parentbb3b1c4f64620ca05d86a20a26c8fa4ca1cf7b78 (diff)
Widen MultiXactOffset to 64 bits
This eliminates MultiXactOffset wraparound and the 2^32 limit on the total number of multixid members. Multixids are still limited to 2^31, but this is a nice improvement because 'members' can grow much faster than the number of multixids. On such systems, you can now run longer before hitting hard limits or triggering anti-wraparound vacuums. Not having to deal with MultiXactOffset wraparound also simplifies the code and removes some gnarly corner cases. We no longer need to perform emergency anti-wraparound freezing because of running out of 'members' space, so the offset stop limit is gone. But you might still not want 'members' to consume huge amounts of disk space. For that reason, I kept the logic for lowering vacuum's multixid freezing cutoff if a large amount of 'members' space is used. The thresholds for that are roughly the same as the "safe" and "danger" thresholds used before, 2 billion transactions and 4 billion transactions. This keeps the behavior for the freeze cutoff roughly the same as before. It might make sense to make this smarter or configurable, now that the threshold is only needed to manage disk usage, but that's left for the future. Add code to pg_upgrade to convert multitransactions from the old to the new format, rewriting the pg_multixact SLRU files. Because pg_upgrade now rewrites the files, we can get rid of some hacks we had put in place to deal with old bugs and upgraded clusters. Bump catalog version for the pg_multixact/offsets format change. Author: Maxim Orlov <orlovmg@gmail.com> Reviewed-by: Ashutosh Bapat <ashutosh.bapat.oss@gmail.com> Reviewed-by: Alexander Korotkov <aekorotkov@gmail.com> Reviewed-by: wenhui qiu <qiuwenhuifx@gmail.com> Discussion: https://www.postgresql.org/message-id/CACG%3DezaWg7_nt-8ey4aKv2w9LcuLthHknwCawmBgEeTnJrJTcw@mail.gmail.com
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/ref/pg_resetwal.sgml13
1 files changed, 8 insertions, 5 deletions
diff --git a/doc/src/sgml/ref/pg_resetwal.sgml b/doc/src/sgml/ref/pg_resetwal.sgml
index 2c019c2aac6..41f2b1d480c 100644
--- a/doc/src/sgml/ref/pg_resetwal.sgml
+++ b/doc/src/sgml/ref/pg_resetwal.sgml
@@ -267,14 +267,17 @@ PostgreSQL documentation
A safe value for the next multitransaction ID (first part) can be
determined by looking for the numerically largest file name in the
directory <filename>pg_multixact/offsets</filename> under the data directory,
- adding one, and then multiplying by 65536 (0x10000). Conversely, a safe
+ adding one, and then multiplying by 32768 (0x8000). Conversely, a safe
value for the oldest multitransaction ID (second part of
<option>-m</option>) can be determined by looking for the numerically smallest
- file name in the same directory and multiplying by 65536. The file
- names are in hexadecimal, so the easiest way to do this is to specify
- the option value in hexadecimal and append four zeroes.
+ file name in the same directory and multiplying by 32768 (0x8000).
+ Note that the file names are in hexadecimal. It is usually easiest
+ to specify the option value in hexadecimal too. For example, if
+ <filename>000F</filename> and <filename>0007</filename> are the greatest and
+ smallest entries in <filename>pg_multixact/offsets</filename>,
+ <literal>-m 0x80000,0x38000</literal> will work.
</para>
- <!-- 65536 = SLRU_PAGES_PER_SEGMENT * BLCKSZ / sizeof(MultiXactOffset) -->
+ <!-- 32768 = SLRU_PAGES_PER_SEGMENT * BLCKSZ / sizeof(MultiXactOffset) -->
</listitem>
</varlistentry>