Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb38c043

Browse files
committed
Reconsider placement of MemoryContextCheck() call --- do after commit,
not before, to avoid duplication of effort.
1 parent4cf6e9e commitb38c043

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

‎src/backend/tcop/postgres.c

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.362 2003/09/02 19:04:12 tgl Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.363 2003/09/14 00:03:32 tgl Exp $
1212
*
1313
* NOTES
1414
* this is the "main" module of the postgres backend and
@@ -1753,17 +1753,18 @@ finish_xact_command(void)
17531753
/* Cancel any active statement timeout before committing */
17541754
disable_sig_alarm(true);
17551755

1756-
#ifdefMEMORY_CONTEXT_CHECKING
1757-
/* Check memory before committing (since commit discards much) */
1758-
MemoryContextCheck(TopMemoryContext);
1759-
#endif
1760-
17611756
/* Now commit the command */
17621757
ereport(DEBUG3,
17631758
(errmsg_internal("CommitTransactionCommand")));
17641759

17651760
CommitTransactionCommand();
17661761

1762+
#ifdefMEMORY_CONTEXT_CHECKING
1763+
/* Check all memory contexts that weren't freed during commit */
1764+
/* (those that were, were checked before being deleted) */
1765+
MemoryContextCheck(TopMemoryContext);
1766+
#endif
1767+
17671768
#ifdefSHOW_MEMORY_STATS
17681769
/* Print mem stats after each commit for leak tracking */
17691770
if (ShowStats)
@@ -2657,7 +2658,7 @@ PostgresMain(int argc, char *argv[], const char *username)
26572658
if (!IsUnderPostmaster)
26582659
{
26592660
puts("\nPOSTGRES backend interactive interface ");
2660-
puts("$Revision: 1.362 $ $Date: 2003/09/02 19:04:12 $\n");
2661+
puts("$Revision: 1.363 $ $Date: 2003/09/14 00:03:32 $\n");
26612662
}
26622663

26632664
/*

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp