aboutsummaryrefslogtreecommitdiff
path: root/src/backend/tcop/postgres.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2001-02-18 04:28:31 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2001-02-18 04:28:31 +0000
commit58c4ab9d6265102d949a0d9035e48a752b3b457f (patch)
tree2ee582f84958a642ab5f49a34c90c9893838db9b /src/backend/tcop/postgres.c
parent81ff09eeb56ea2eba81632d9432240a237ca1047 (diff)
downloadpostgresql-58c4ab9d6265102d949a0d9035e48a752b3b457f.tar.gz
postgresql-58c4ab9d6265102d949a0d9035e48a752b3b457f.zip
Remove bogus set_ps_display call --- changing displayed status here is
either wrong or unnecessary in most cases, and on systems where setting status takes a kernel call, the overhead of setting status three times per command rather than two is annoying.
Diffstat (limited to 'src/backend/tcop/postgres.c')
-rw-r--r--src/backend/tcop/postgres.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c
index 8ffa33f539e..fbee4470c98 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.206 2001/01/24 19:43:09 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.207 2001/02/18 04:28:31 tgl Exp $
*
* NOTES
* this is the "main" module of the postgres backend and
@@ -878,7 +878,7 @@ finish_xact_command(void)
/* Now commit the command */
if (DebugLvl >= 1)
elog(DEBUG, "CommitTransactionCommand");
- set_ps_display("commit"); /* XXX probably the wrong place to do this */
+
CommitTransactionCommand();
#ifdef SHOW_MEMORY_STATS
@@ -1680,7 +1680,7 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[], const cha
if (!IsUnderPostmaster)
{
puts("\nPOSTGRES backend interactive interface ");
- puts("$Revision: 1.206 $ $Date: 2001/01/24 19:43:09 $\n");
+ puts("$Revision: 1.207 $ $Date: 2001/02/18 04:28:31 $\n");
}
/*
@@ -1781,6 +1781,11 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[], const cha
*/
ReadyForQuery(whereToSendOutput);
+ if (IsTransactionBlock())
+ set_ps_display("idle in transaction");
+ else
+ set_ps_display("idle");
+
/* ----------------
* (2) deal with pending asynchronous NOTIFY from other backends,
* and enable async.c's signal handler to execute NOTIFY directly.
@@ -1791,10 +1796,6 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[], const cha
EnableNotifyInterrupt();
- if (!IsTransactionBlock())
- set_ps_display("idle");
- else set_ps_display("idle in transaction");
-
/* Allow "die" interrupt to be processed while waiting */
ImmediateInterruptOK = true;
/* and don't forget to detect one that already arrived */