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
94952948
Commit
94952948
authored
Oct 07, 2000
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Second thoughts about where to put DeferredTriggerEndQuery() call.
parent
fbd26d69
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
13 deletions
+12
-13
src/backend/tcop/postgres.c
src/backend/tcop/postgres.c
+12
-13
No files found.
src/backend/tcop/postgres.c
View file @
94952948
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.17
8 2000/10/07 00:58:18
tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.17
9 2000/10/07 04:00:41
tgl Exp $
*
*
* NOTES
* NOTES
* this is the "main" module of the postgres backend and
* this is the "main" module of the postgres backend and
...
@@ -597,10 +597,9 @@ pg_plan_query(Query *querytree)
...
@@ -597,10 +597,9 @@ pg_plan_query(Query *querytree)
*
*
* Assumptions:
* Assumptions:
*
*
* Caller is responsible for calling StartTransactionCommand() beforehand
* At call, we are not inside a transaction command.
* and CommitTransactionCommand() afterwards (if successful).
*
*
* The CurrentMemoryContext a
t entry references a context that is
* The CurrentMemoryContext a
fter starting a transaction command must be
* appropriate for execution of individual queries (typically this will be
* appropriate for execution of individual queries (typically this will be
* TransactionCommandContext). Note that this routine resets that context
* TransactionCommandContext). Note that this routine resets that context
* after each individual query, so don't store anything there that
* after each individual query, so don't store anything there that
...
@@ -608,7 +607,7 @@ pg_plan_query(Query *querytree)
...
@@ -608,7 +607,7 @@ pg_plan_query(Query *querytree)
*
*
* parse_context references a context suitable for holding the
* parse_context references a context suitable for holding the
* parse/rewrite trees (typically this will be QueryContext).
* parse/rewrite trees (typically this will be QueryContext).
* This context *must* be longer-lived than the
CurrentMemoryC
ontext!
* This context *must* be longer-lived than the
transaction c
ontext!
* In fact, if the query string might contain BEGIN/COMMIT commands,
* In fact, if the query string might contain BEGIN/COMMIT commands,
* parse_context had better outlive TopTransactionContext!
* parse_context had better outlive TopTransactionContext!
*
*
...
@@ -635,7 +634,7 @@ pg_exec_query_string(char *query_string, /* string to execute */
...
@@ -635,7 +634,7 @@ pg_exec_query_string(char *query_string, /* string to execute */
* query_string will be in this same command block, *unless* we find
* query_string will be in this same command block, *unless* we find
* a BEGIN/COMMIT/ABORT statement; we have to force a new xact command
* a BEGIN/COMMIT/ABORT statement; we have to force a new xact command
* after one of those, else bad things will happen in xact.c.
* after one of those, else bad things will happen in xact.c.
* (Note that this will possibly change
execution
memory context.)
* (Note that this will possibly change
current
memory context.)
*/
*/
start_xact_command
();
start_xact_command
();
xact_started
=
true
;
xact_started
=
true
;
...
@@ -837,11 +836,6 @@ pg_exec_query_string(char *query_string, /* string to execute */
...
@@ -837,11 +836,6 @@ pg_exec_query_string(char *query_string, /* string to execute */
if
(
!
isTransactionStmt
)
if
(
!
isTransactionStmt
)
CommandCounterIncrement
();
CommandCounterIncrement
();
/*
* Invoke IMMEDIATE constraint triggers
*/
DeferredTriggerEndQuery
();
/*
/*
* Clear the execution context to recover temporary
* Clear the execution context to recover temporary
* memory used by the query. NOTE: if query string contains
* memory used by the query. NOTE: if query string contains
...
@@ -888,12 +882,17 @@ start_xact_command(void)
...
@@ -888,12 +882,17 @@ start_xact_command(void)
static
void
static
void
finish_xact_command
(
void
)
finish_xact_command
(
void
)
{
{
/* Invoke IMMEDIATE constraint triggers */
DeferredTriggerEndQuery
();
/* Now commit the command */
if
(
DebugLvl
>=
1
)
if
(
DebugLvl
>=
1
)
elog
(
DEBUG
,
"CommitTransactionCommand"
);
elog
(
DEBUG
,
"CommitTransactionCommand"
);
set_ps_display
(
"commit"
);
/* XXX probably the wrong place to do this */
set_ps_display
(
"commit"
);
/* XXX probably the wrong place to do this */
CommitTransactionCommand
();
CommitTransactionCommand
();
#ifdef SHOW_MEMORY_STATS
#ifdef SHOW_MEMORY_STATS
/*
p
rint mem stats at each commit for leak tracking */
/*
P
rint mem stats at each commit for leak tracking */
if
(
ShowStats
)
if
(
ShowStats
)
MemoryContextStats
(
TopMemoryContext
);
MemoryContextStats
(
TopMemoryContext
);
#endif
#endif
...
@@ -1614,7 +1613,7 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[], const cha
...
@@ -1614,7 +1613,7 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[], const cha
if
(
!
IsUnderPostmaster
)
if
(
!
IsUnderPostmaster
)
{
{
puts
(
"
\n
POSTGRES backend interactive interface "
);
puts
(
"
\n
POSTGRES backend interactive interface "
);
puts
(
"$Revision: 1.17
8 $ $Date: 2000/10/07 00:58:18
$
\n
"
);
puts
(
"$Revision: 1.17
9 $ $Date: 2000/10/07 04:00:41
$
\n
"
);
}
}
/*
/*
...
...
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