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
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-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

Browse pgsql-hackers by date

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

Browse pgsql-patches by date

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