|
8 | 8 | *
|
9 | 9 | *
|
10 | 10 | * IDENTIFICATION
|
11 |
| - * $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.359 2003/08/12 18:52:38 tgl Exp $ |
| 11 | + * $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.360 2003/08/13 16:16:23 tgl Exp $ |
12 | 12 | *
|
13 | 13 | * NOTES
|
14 | 14 | * this is the "main" module of the postgres backend and
|
@@ -1753,14 +1753,19 @@ finish_xact_command(void)
|
1753 | 1753 | /* Cancel any active statement timeout before committing */
|
1754 | 1754 | disable_sig_alarm(true);
|
1755 | 1755 |
|
| 1756 | +#ifdef MEMORY_CONTEXT_CHECKING |
| 1757 | + /* Check memory before committing (since commit discards much) */ |
| 1758 | + MemoryContextCheck(TopMemoryContext); |
| 1759 | +#endif |
| 1760 | + |
1756 | 1761 | /* Now commit the command */
|
1757 | 1762 | ereport(DEBUG3,
|
1758 | 1763 | (errmsg_internal("CommitTransactionCommand")));
|
1759 | 1764 |
|
1760 | 1765 | CommitTransactionCommand();
|
1761 | 1766 |
|
1762 | 1767 | #ifdef SHOW_MEMORY_STATS
|
1763 |
| - /* Print mem stats at each commit for leak tracking */ |
| 1768 | + /* Print mem stats after each commit for leak tracking */ |
1764 | 1769 | if (ShowStats)
|
1765 | 1770 | MemoryContextStats(TopMemoryContext);
|
1766 | 1771 | #endif
|
@@ -2646,7 +2651,7 @@ PostgresMain(int argc, char *argv[], const char *username)
|
2646 | 2651 | if (!IsUnderPostmaster)
|
2647 | 2652 | {
|
2648 | 2653 | puts("\nPOSTGRES backend interactive interface ");
|
2649 |
| - puts("$Revision: 1.359 $ $Date: 2003/08/12 18:52:38 $\n"); |
| 2654 | + puts("$Revision: 1.360 $ $Date: 2003/08/13 16:16:23 $\n"); |
2650 | 2655 | }
|
2651 | 2656 |
|
2652 | 2657 | /*
|
@@ -3063,15 +3068,6 @@ PostgresMain(int argc, char *argv[], const char *username)
|
3063 | 3068 | errmsg("invalid frontend message type %d",
|
3064 | 3069 | firstchar)));
|
3065 | 3070 | }
|
3066 |
| - |
3067 |
| -#ifdef MEMORY_CONTEXT_CHECKING |
3068 |
| - |
3069 |
| - /* |
3070 |
| - * Check all memory after each backend loop. This is a rather |
3071 |
| - * weird place to do it, perhaps. |
3072 |
| - */ |
3073 |
| - MemoryContextCheck(TopMemoryContext); |
3074 |
| -#endif |
3075 | 3071 | } /* end of input-reading loop */
|
3076 | 3072 |
|
3077 | 3073 | /* can't get here because the above loop never exits */
|
|
0 commit comments