diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2003-08-12 18:23:21 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2003-08-12 18:23:21 +0000 |
commit | fcb90fdc95c690a88727a79e9feb687fa6d6c3b9 (patch) | |
tree | 82018f45f60f48ee155b64121e271dcac0f22c50 /src/backend/tcop/postgres.c | |
parent | 1c6702f6fc6b7feea8bf10cc0d4ed3ca5edf4855 (diff) | |
download | postgresql-fcb90fdc95c690a88727a79e9feb687fa6d6c3b9.tar.gz postgresql-fcb90fdc95c690a88727a79e9feb687fa6d6c3b9.zip |
Change some frequently-reached elog(DEBUG...) calls to ereport(DEBUG...)
for speed reasons. (ereport falls out much more quickly when no output
is needed than elog does.)
Diffstat (limited to 'src/backend/tcop/postgres.c')
-rw-r--r-- | src/backend/tcop/postgres.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c index 22cd42f9800..72af4d0bf98 100644 --- a/src/backend/tcop/postgres.c +++ b/src/backend/tcop/postgres.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.357 2003/08/06 17:46:45 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.358 2003/08/12 18:23:21 tgl Exp $ * * NOTES * this is the "main" module of the postgres backend and @@ -1730,7 +1730,8 @@ start_xact_command(void) { if (!xact_started) { - elog(DEBUG3, "StartTransactionCommand"); + ereport(DEBUG3, + (errmsg_internal("StartTransactionCommand"))); StartTransactionCommand(); /* Set statement timeout running, if any */ @@ -1753,7 +1754,8 @@ finish_xact_command(void) disable_sig_alarm(true); /* Now commit the command */ - elog(DEBUG3, "CommitTransactionCommand"); + ereport(DEBUG3, + (errmsg_internal("CommitTransactionCommand"))); CommitTransactionCommand(); @@ -2620,7 +2622,8 @@ PostgresMain(int argc, char *argv[], const char *username) * putting it inside InitPostgres() instead. In particular, anything * that involves database access should be there, not here. */ - elog(DEBUG3, "InitPostgres"); + ereport(DEBUG3, + (errmsg_internal("InitPostgres"))); InitPostgres(dbname, username); SetProcessingMode(NormalProcessing); @@ -2643,7 +2646,7 @@ PostgresMain(int argc, char *argv[], const char *username) if (!IsUnderPostmaster) { puts("\nPOSTGRES backend interactive interface "); - puts("$Revision: 1.357 $ $Date: 2003/08/06 17:46:45 $\n"); + puts("$Revision: 1.358 $ $Date: 2003/08/12 18:23:21 $\n"); } /* @@ -2702,7 +2705,8 @@ PostgresMain(int argc, char *argv[], const char *username) MemoryContextSwitchTo(ErrorContext); /* Do the recovery */ - elog(DEBUG2, "AbortCurrentTransaction"); + ereport(DEBUG2, + (errmsg_internal("AbortCurrentTransaction"))); AbortCurrentTransaction(); /* |