mirror of
https://github.com/postgres/postgres.git
synced 2025-06-16 06:01:02 +03:00
Reconsider placement of MemoryContextCheck() call --- do after commit,
not before, to avoid duplication of effort.
This commit is contained in:
@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.362 2003/09/02 19:04:12 tgl Exp $
|
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.363 2003/09/14 00:03:32 tgl Exp $
|
||||||
*
|
*
|
||||||
* NOTES
|
* NOTES
|
||||||
* this is the "main" module of the postgres backend and
|
* this is the "main" module of the postgres backend and
|
||||||
@ -1753,17 +1753,18 @@ finish_xact_command(void)
|
|||||||
/* Cancel any active statement timeout before committing */
|
/* Cancel any active statement timeout before committing */
|
||||||
disable_sig_alarm(true);
|
disable_sig_alarm(true);
|
||||||
|
|
||||||
#ifdef MEMORY_CONTEXT_CHECKING
|
|
||||||
/* Check memory before committing (since commit discards much) */
|
|
||||||
MemoryContextCheck(TopMemoryContext);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Now commit the command */
|
/* Now commit the command */
|
||||||
ereport(DEBUG3,
|
ereport(DEBUG3,
|
||||||
(errmsg_internal("CommitTransactionCommand")));
|
(errmsg_internal("CommitTransactionCommand")));
|
||||||
|
|
||||||
CommitTransactionCommand();
|
CommitTransactionCommand();
|
||||||
|
|
||||||
|
#ifdef MEMORY_CONTEXT_CHECKING
|
||||||
|
/* Check all memory contexts that weren't freed during commit */
|
||||||
|
/* (those that were, were checked before being deleted) */
|
||||||
|
MemoryContextCheck(TopMemoryContext);
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef SHOW_MEMORY_STATS
|
#ifdef SHOW_MEMORY_STATS
|
||||||
/* Print mem stats after each commit for leak tracking */
|
/* Print mem stats after each commit for leak tracking */
|
||||||
if (ShowStats)
|
if (ShowStats)
|
||||||
@ -2657,7 +2658,7 @@ PostgresMain(int argc, char *argv[], const char *username)
|
|||||||
if (!IsUnderPostmaster)
|
if (!IsUnderPostmaster)
|
||||||
{
|
{
|
||||||
puts("\nPOSTGRES backend interactive interface ");
|
puts("\nPOSTGRES backend interactive interface ");
|
||||||
puts("$Revision: 1.362 $ $Date: 2003/09/02 19:04:12 $\n");
|
puts("$Revision: 1.363 $ $Date: 2003/09/14 00:03:32 $\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Reference in New Issue
Block a user