Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
postgres-lambda-diff
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jakob Huber
postgres-lambda-diff
Commits
fcff4bd3
Commit
fcff4bd3
authored
11 years ago
by
Tom Lane
Browse files
Options
Downloads
Patches
Plain Diff
Fix ancient docs/comments thinko: XID comparison is mod 2^32, not 2^31.
Pointed out by Gianni Ciolli.
parent
9c9a1f2e
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
doc/src/sgml/maintenance.sgml
+1
-1
1 addition, 1 deletion
doc/src/sgml/maintenance.sgml
src/backend/access/transam/transam.c
+1
-1
1 addition, 1 deletion
src/backend/access/transam/transam.c
with
2 additions
and
2 deletions
doc/src/sgml/maintenance.sgml
+
1
−
1
View file @
fcff4bd3
...
@@ -401,7 +401,7 @@
...
@@ -401,7 +401,7 @@
as <literal>FrozenXID</>. This XID does not follow the normal XID
as <literal>FrozenXID</>. This XID does not follow the normal XID
comparison rules and is always considered older
comparison rules and is always considered older
than every normal XID. Normal XIDs are
than every normal XID. Normal XIDs are
compared using modulo-2<superscript>3
1
</> arithmetic. This means
compared using modulo-2<superscript>3
2
</> arithmetic. This means
that for every normal XID, there are two billion XIDs that are
that for every normal XID, there are two billion XIDs that are
<quote>older</> and two billion that are <quote>newer</>; another
<quote>older</> and two billion that are <quote>newer</>; another
way to say it is that the normal XID space is circular with no
way to say it is that the normal XID space is circular with no
...
...
This diff is collapsed.
Click to expand it.
src/backend/access/transam/transam.c
+
1
−
1
View file @
fcff4bd3
...
@@ -304,7 +304,7 @@ TransactionIdPrecedes(TransactionId id1, TransactionId id2)
...
@@ -304,7 +304,7 @@ TransactionIdPrecedes(TransactionId id1, TransactionId id2)
{
{
/*
/*
* If either ID is a permanent XID then we can just do unsigned
* If either ID is a permanent XID then we can just do unsigned
* comparison. If both are normal, do a modulo-2^3
1
comparison.
* comparison. If both are normal, do a modulo-2^3
2
comparison.
*/
*/
int32
diff
;
int32
diff
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment