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

Commit607f889

Browse files
committed
Fix ancient docs/comments thinko: XID comparison is mod 2^32, not 2^31.
Pointed out by Gianni Ciolli.
1 parent7d6f5dd commit607f889

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

‎doc/src/sgml/maintenance.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@
359359
as <literal>FrozenXID</>. This XID does not follow the normal XID
360360
comparison rules and is always considered older
361361
than every normal XID. Normal XIDs are
362-
compared using modulo-2<superscript>31</> arithmetic. This means
362+
compared using modulo-2<superscript>32</> arithmetic. This means
363363
that for every normal XID, there are two billion XIDs that are
364364
<quote>older</> and two billion that are <quote>newer</>; another
365365
way to say it is that the normal XID space is circular with no

‎src/backend/access/transam/transam.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ TransactionIdPrecedes(TransactionId id1, TransactionId id2)
305305
{
306306
/*
307307
* If either ID is a permanent XID then we can just do unsigned
308-
* comparison.If both are normal, do a modulo-2^31 comparison.
308+
* comparison.If both are normal, do a modulo-2^32 comparison.
309309
*/
310310
int32diff;
311311

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp