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
3428ef79
Commit
3428ef79
authored
Mar 24, 2017
by
Simon Riggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reverting
42b4b0b2
Buildfarm issues and other reported issues
parent
70adf2fb
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
22 deletions
+7
-22
src/backend/access/transam/xact.c
src/backend/access/transam/xact.c
+3
-3
src/backend/utils/time/snapmgr.c
src/backend/utils/time/snapmgr.c
+3
-18
src/include/utils/snapmgr.h
src/include/utils/snapmgr.h
+1
-1
No files found.
src/backend/access/transam/xact.c
View file @
3428ef79
...
...
@@ -2137,7 +2137,7 @@ CommitTransaction(void)
AtEOXact_ComboCid
();
AtEOXact_HashTables
(
true
);
AtEOXact_PgStat
(
true
);
AtEOXact_Snapshot
(
true
,
false
);
AtEOXact_Snapshot
(
true
);
AtCommit_ApplyLauncher
();
pgstat_report_xact_timestamp
(
0
);
...
...
@@ -2409,7 +2409,7 @@ PrepareTransaction(void)
AtEOXact_ComboCid
();
AtEOXact_HashTables
(
true
);
/* don't call AtEOXact_PgStat here; we fixed pgstat state above */
AtEOXact_Snapshot
(
true
,
true
);
AtEOXact_Snapshot
(
true
);
pgstat_report_xact_timestamp
(
0
);
CurrentResourceOwner
=
NULL
;
...
...
@@ -2640,7 +2640,7 @@ CleanupTransaction(void)
* do abort cleanup processing
*/
AtCleanup_Portals
();
/* now safe to release portal memory */
AtEOXact_Snapshot
(
false
,
false
);
/* and release the transaction's snapshots */
AtEOXact_Snapshot
(
false
);
/* and release the transaction's snapshots */
CurrentResourceOwner
=
NULL
;
/* and resource owner */
if
(
TopTransactionResourceOwner
)
...
...
src/backend/utils/time/snapmgr.c
View file @
3428ef79
...
...
@@ -954,12 +954,7 @@ xmin_cmp(const pairingheap_node *a, const pairingheap_node *b, void *arg)
*
* If there are no more snapshots, we can reset our PGXACT->xmin to InvalidXid.
* Note we can do this without locking because we assume that storing an Xid
* is atomic. We do this because it will allow multi-statement transactions to
* reset their xmin and prevent us from holding back removal of dead rows;
* this has little purpose when we are dealing with very fast statements in
* read committed mode since the xmin will advance quickly anyway. It has no
* use at all when we are running single statement transactions since the xmin
* is reset as part of end of transaction anyway.
* is atomic.
*
* Even if there are some remaining snapshots, we may be able to advance our
* PGXACT->xmin to some degree. This typically happens when a portal is
...
...
@@ -1056,7 +1051,7 @@ AtSubAbort_Snapshot(int level)
* Snapshot manager's cleanup function for end of transaction
*/
void
AtEOXact_Snapshot
(
bool
isCommit
,
bool
isPrepare
)
AtEOXact_Snapshot
(
bool
isCommit
)
{
/*
* In transaction-snapshot mode we must release our privately-managed
...
...
@@ -1141,17 +1136,7 @@ AtEOXact_Snapshot(bool isCommit, bool isPrepare)
FirstSnapshotSet
=
false
;
/*
* During normal commit and abort processing, we call
* ProcArrayEndTransaction() or ProcArrayClearTransaction() to
* reset the PgXact->xmin. That call happens prior to the call to
* AtEOXact_Snapshot(), so we need not touch xmin here at all,
* accept when we are preparing a transaction.
*/
if
(
isPrepare
)
SnapshotResetXmin
();
Assert
(
MyPgXact
->
xmin
==
0
);
}
...
...
src/include/utils/snapmgr.h
View file @
3428ef79
...
...
@@ -85,7 +85,7 @@ extern void UnregisterSnapshotFromOwner(Snapshot snapshot, ResourceOwner owner);
extern
void
AtSubCommit_Snapshot
(
int
level
);
extern
void
AtSubAbort_Snapshot
(
int
level
);
extern
void
AtEOXact_Snapshot
(
bool
isCommit
,
bool
isPrepare
);
extern
void
AtEOXact_Snapshot
(
bool
isCommit
);
extern
void
ImportSnapshot
(
const
char
*
idstr
);
extern
bool
XactHasExportedSnapshots
(
void
);
...
...
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