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
57eeb0d3
Commit
57eeb0d3
authored
Jul 02, 2000
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New memmgr logic in xact.c failed if AbortTransaction() is called when
there is no open transaction.
parent
e2252604
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
10 deletions
+21
-10
src/backend/access/transam/xact.c
src/backend/access/transam/xact.c
+21
-10
No files found.
src/backend/access/transam/xact.c
View file @
57eeb0d3
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.6
8 2000/06/28 03:31:05
tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.6
9 2000/07/02 02:28:38
tgl Exp $
*
* NOTES
* Transaction aborts can now occur two ways:
...
...
@@ -749,6 +749,7 @@ AtCommit_Memory()
* Release all transaction-local memory.
* ----------------
*/
Assert
(
TopTransactionContext
!=
NULL
);
MemoryContextDelete
(
TopTransactionContext
);
TopTransactionContext
=
NULL
;
TransactionCommandContext
=
NULL
;
...
...
@@ -825,17 +826,26 @@ AtAbort_Memory()
{
/* ----------------
* Make sure we are in a valid context (not a child of
* TransactionCommandContext...)
* TransactionCommandContext...). Note that it is possible
* for this code to be called when we aren't in a transaction
* at all; go directly to TopMemoryContext in that case.
* ----------------
*/
MemoryContextSwitchTo
(
TransactionCommandContext
);
if
(
TransactionCommandContext
!=
NULL
)
{
MemoryContextSwitchTo
(
TransactionCommandContext
);
/* ----------------
* We do not want to destroy transaction contexts yet,
* but it should be OK to delete any command-local memory.
* ----------------
*/
MemoryContextResetAndDeleteChildren
(
TransactionCommandContext
);
/* ----------------
* We do not want to destroy transaction contexts yet,
* but it should be OK to delete any command-local memory.
* ----------------
*/
MemoryContextResetAndDeleteChildren
(
TransactionCommandContext
);
}
else
{
MemoryContextSwitchTo
(
TopMemoryContext
);
}
}
...
...
@@ -863,7 +873,8 @@ AtCleanup_Memory()
* Release all transaction-local memory.
* ----------------
*/
MemoryContextDelete
(
TopTransactionContext
);
if
(
TopTransactionContext
!=
NULL
)
MemoryContextDelete
(
TopTransactionContext
);
TopTransactionContext
=
NULL
;
TransactionCommandContext
=
NULL
;
}
...
...
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