Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 58c4ab9

Browse files
committed
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.
1 parent 81ff09e commit 58c4ab9

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.206 2001/01/24 19:43:09 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.207 2001/02/18 04:28:31 tgl Exp $
1212
*
1313
* NOTES
1414
* this is the "main" module of the postgres backend and
@@ -878,7 +878,7 @@ finish_xact_command(void)
878878
/* Now commit the command */
879879
if (DebugLvl >= 1)
880880
elog(DEBUG, "CommitTransactionCommand");
881-
set_ps_display("commit"); /* XXX probably the wrong place to do this */
881+
882882
CommitTransactionCommand();
883883

884884
#ifdef SHOW_MEMORY_STATS
@@ -1680,7 +1680,7 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[], const cha
16801680
if (!IsUnderPostmaster)
16811681
{
16821682
puts("\nPOSTGRES backend interactive interface ");
1683-
puts("$Revision: 1.206 $ $Date: 2001/01/24 19:43:09 $\n");
1683+
puts("$Revision: 1.207 $ $Date: 2001/02/18 04:28:31 $\n");
16841684
}
16851685

16861686
/*
@@ -1781,6 +1781,11 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[], const cha
17811781
*/
17821782
ReadyForQuery(whereToSendOutput);
17831783

1784+
if (IsTransactionBlock())
1785+
set_ps_display("idle in transaction");
1786+
else
1787+
set_ps_display("idle");
1788+
17841789
/* ----------------
17851790
* (2) deal with pending asynchronous NOTIFY from other backends,
17861791
* 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
17911796

17921797
EnableNotifyInterrupt();
17931798

1794-
if (!IsTransactionBlock())
1795-
set_ps_display("idle");
1796-
else set_ps_display("idle in transaction");
1797-
17981799
/* Allow "die" interrupt to be processed while waiting */
17991800
ImmediateInterruptOK = true;
18001801
/* and don't forget to detect one that already arrived */

0 commit comments

Comments
 (0)