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
23f264d1
Commit
23f264d1
authored
Oct 29, 2004
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rearrange order of pre-commit operations: must close cursors before doing
ON COMMIT actions. Per bug report from Michael Guerin.
parent
7d38e594
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
19 deletions
+20
-19
src/backend/access/transam/xact.c
src/backend/access/transam/xact.c
+20
-19
No files found.
src/backend/access/transam/xact.c
View file @
23f264d1
...
...
@@ -10,7 +10,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/access/transam/xact.c,v 1.19
2 2004/10/16 18:57:22
tgl Exp $
* $PostgreSQL: pgsql/src/backend/access/transam/xact.c,v 1.19
3 2004/10/29 22:19:53
tgl Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -1437,6 +1437,11 @@ CommitTransaction(void)
TransStateAsString
(
s
->
state
));
Assert
(
s
->
parent
==
NULL
);
/*
* Do pre-commit processing (most of this stuff requires database
* access, and in fact could still cause an error...)
*/
/*
* Tell the trigger manager that this transaction is about to be
* committed. He'll invoke all trigger deferred until XACT before we
...
...
@@ -1444,27 +1449,14 @@ CommitTransaction(void)
*/
AfterTriggerEndXact
();
/*
* Similarly, let ON COMMIT management do its thing before we start to
* commit.
*/
PreCommit_on_commit_actions
();
/* Prevent cancel/die interrupt while cleaning up */
HOLD_INTERRUPTS
();
/*
* set the current transaction state information appropriately during
* the abort processing
*/
s
->
state
=
TRANS_COMMIT
;
/* Close open cursors */
AtCommit_Portals
();
/*
*
Do pre-commit processing (most of this stuff requires database
*
access, and in fact could still cause an error...
)
*
Let ON COMMIT management do its thing (must happen after closing
*
cursors, to avoid dangling-reference problems
)
*/
AtCommit_Portals
();
PreCommit_on_commit_actions
();
/* close large objects before lower-level cleanup */
AtEOXact_LargeObject
(
true
);
...
...
@@ -1476,6 +1468,15 @@ CommitTransaction(void)
/* This should be the last step before commit */
AtEOXact_UpdatePasswordFile
(
true
);
/* Prevent cancel/die interrupt while cleaning up */
HOLD_INTERRUPTS
();
/*
* set the current transaction state information appropriately during
* the abort processing
*/
s
->
state
=
TRANS_COMMIT
;
/*
* Here is where we really truly commit.
*/
...
...
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