Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
867540b4
Commit
867540b4
authored
May 12, 2012
by
Simon Riggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ensure backwards compatibility for GetStableLatestTransactionId()
parent
afe86a9e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
src/backend/access/transam/xact.c
src/backend/access/transam/xact.c
+8
-6
No files found.
src/backend/access/transam/xact.c
View file @
867540b4
...
@@ -390,11 +390,10 @@ GetCurrentTransactionIdIfAny(void)
...
@@ -390,11 +390,10 @@ GetCurrentTransactionIdIfAny(void)
return
CurrentTransactionState
->
transactionId
;
return
CurrentTransactionState
->
transactionId
;
}
}
/*
/*
* GetStableLatestTransactionId
IfAny
* GetStableLatestTransactionId
*
*
* Get the
latest
XID once and then return same value for rest of transaction.
* Get the XID once and then return same value for rest of transaction.
* Acts as a useful reference point for maintenance tasks.
* Acts as a useful reference point for maintenance tasks.
*/
*/
TransactionId
TransactionId
...
@@ -403,13 +402,16 @@ GetStableLatestTransactionId(void)
...
@@ -403,13 +402,16 @@ GetStableLatestTransactionId(void)
static
LocalTransactionId
lxid
=
InvalidLocalTransactionId
;
static
LocalTransactionId
lxid
=
InvalidLocalTransactionId
;
static
TransactionId
stablexid
=
InvalidTransactionId
;
static
TransactionId
stablexid
=
InvalidTransactionId
;
if
(
lxid
!=
MyProc
->
lxid
||
if
(
lxid
!=
MyProc
->
lxid
)
!
TransactionIdIsValid
(
stablexid
))
{
{
lxid
=
MyProc
->
lxid
;
lxid
=
MyProc
->
lxid
;
stablexid
=
ReadNewTransactionId
();
stablexid
=
GetTopTransactionIdIfAny
();
if
(
!
TransactionIdIsValid
(
stablexid
))
stablexid
=
ReadNewTransactionId
();
}
}
Assert
(
TransactionIdIsValid
(
stablexid
));
return
stablexid
;
return
stablexid
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment