Skip site navigation (1) Skip section navigation (2)

Re: [HACKERS] Overhead for stats_command_string et al, take 2

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [HACKERS] Overhead for stats_command_string et al, take 2
Date: 2006-06-26 21:43:22
Message-ID: 23302.1151358202@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
Bruce Momjian <bruce(at)momjian(dot)us> writes:
> Tom Lane wrote:
>> This is an ugly patch.  Why not *one* test of the GUC variable, inside
>> set_ps_display(), and no side-effects on callers?  You would need to
>> force an initial update from init_ps_display, but that only requires a
>> small amount of code refactoring inside ps_status.c.

> Consider all the helper processes that set their process title.  The
> only thing I can think of is to add a boolean to set_ps_display() so say
> whether this is per-command set or not. Is that your idea?

No, that's not what I said at all.  Currently init_ps_display doesn't
actually force the display to update; it's left to the first
set_ps_display call to do that.  If we made init_ps_display update the
status unconditionally, then set_ps_display could be a conditional
no-op, and in the helper process setup code

	/* Identify myself via ps */
	init_ps_display("autovacuum process", "", "");
	set_ps_display("");

we could remove the now-unnecessary set_ps_display("") calls, but
the other set_ps_display() calls would stay exactly like they are.

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Oleg BartunovDate: 2006-06-26 21:48:13
Subject: Re: GIN index creation extremely slow ?
Previous:From: Bruce MomjianDate: 2006-06-26 21:36:38
Subject: Re: [HACKERS] Overhead for stats_command_string et al, take

pgsql-patches by date

Next:From: Bruce MomjianDate: 2006-06-26 21:49:31
Subject: Re: [HACKERS] Overhead for stats_command_string et al, take
Previous:From: Bruce MomjianDate: 2006-06-26 21:36:38
Subject: Re: [HACKERS] Overhead for stats_command_string et al, take

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group