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
174a5133
Commit
174a5133
authored
14 years ago
by
Tom Lane
Browse files
Options
Downloads
Patches
Plain Diff
Cosmetic fixes for KnownAssignedXidsGetOldestXmin, per Fujii Masao.
parent
eb36d1ad
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/backend/storage/ipc/procarray.c
+9
-4
9 additions, 4 deletions
src/backend/storage/ipc/procarray.c
with
9 additions
and
4 deletions
src/backend/storage/ipc/procarray.c
+
9
−
4
View file @
174a5133
...
@@ -37,7 +37,7 @@
...
@@ -37,7 +37,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/storage/ipc/procarray.c,v 1.7
4
2010/08/30 1
4:16:48 sriggs
Exp $
* $PostgreSQL: pgsql/src/backend/storage/ipc/procarray.c,v 1.7
5
2010/08/30 1
7:30:44 tgl
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -156,7 +156,7 @@ static int KnownAssignedXidsGet(TransactionId *xarray, TransactionId xmax);
...
@@ -156,7 +156,7 @@ static int KnownAssignedXidsGet(TransactionId *xarray, TransactionId xmax);
static
int
KnownAssignedXidsGetAndSetXmin
(
TransactionId
*
xarray
,
static
int
KnownAssignedXidsGetAndSetXmin
(
TransactionId
*
xarray
,
TransactionId
*
xmin
,
TransactionId
*
xmin
,
TransactionId
xmax
);
TransactionId
xmax
);
static
int
KnownAssignedXidsGetOldestXmin
(
void
);
static
TransactionId
KnownAssignedXidsGetOldestXmin
(
void
);
static
void
KnownAssignedXidsDisplay
(
int
trace_level
);
static
void
KnownAssignedXidsDisplay
(
int
trace_level
);
/*
/*
...
@@ -564,7 +564,7 @@ ProcArrayApplyRecoveryInfo(RunningTransactions running)
...
@@ -564,7 +564,7 @@ ProcArrayApplyRecoveryInfo(RunningTransactions running)
/*
/*
* Now we have a copy of any KnownAssignedXids we can zero the array
* Now we have a copy of any KnownAssignedXids we can zero the array
* before we re-insert
ion of
combined snapshot.
* before we re-insert combined snapshot.
*/
*/
KnownAssignedXidsRemovePreceding
(
InvalidTransactionId
);
KnownAssignedXidsRemovePreceding
(
InvalidTransactionId
);
...
@@ -1120,6 +1120,7 @@ GetOldestXmin(bool allDbs, bool ignoreVacuum)
...
@@ -1120,6 +1120,7 @@ GetOldestXmin(bool allDbs, bool ignoreVacuum)
* older than the main procarray.
* older than the main procarray.
*/
*/
TransactionId
kaxmin
=
KnownAssignedXidsGetOldestXmin
();
TransactionId
kaxmin
=
KnownAssignedXidsGetOldestXmin
();
if
(
TransactionIdIsNormal
(
kaxmin
)
&&
if
(
TransactionIdIsNormal
(
kaxmin
)
&&
TransactionIdPrecedes
(
kaxmin
,
result
))
TransactionIdPrecedes
(
kaxmin
,
result
))
result
=
kaxmin
;
result
=
kaxmin
;
...
@@ -3028,7 +3029,11 @@ KnownAssignedXidsGetAndSetXmin(TransactionId *xarray, TransactionId *xmin,
...
@@ -3028,7 +3029,11 @@ KnownAssignedXidsGetAndSetXmin(TransactionId *xarray, TransactionId *xmin,
return
count
;
return
count
;
}
}
static
int
/*
* Get oldest XID in the KnownAssignedXids array, or InvalidTransactionId
* if nothing there.
*/
static
TransactionId
KnownAssignedXidsGetOldestXmin
(
void
)
KnownAssignedXidsGetOldestXmin
(
void
)
{
{
/* use volatile pointer to prevent code rearrangement */
/* use volatile pointer to prevent code rearrangement */
...
...
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