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

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [HACKERS] Overhead for stats_command_string et al, take
Date: 2006-06-26 21:36:38
Message-ID: 200606262136.k5QLacc22200@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Tom Lane wrote:
> Bruce Momjian <bruce(at)momjian(dot)us> writes:
> > Attached patch adds GUC 'update_process_title' to control ps display
> > updates per SQL command. Default to 'on'. GUC name OK?
>
> 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?

> The one place that might be worth having an external test on the GUC is
> in lock.c, but then it should bypass the entire business of copying,
> modifying, and restoring the title ... not just the two set_ps_display
> calls.

OK, that makes sense.

--
Bruce Momjian bruce(at)momjian(dot)us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2006-06-26 21:43:22 Re: [HACKERS] Overhead for stats_command_string et al, take 2
Previous Message Alvaro Herrera 2006-06-26 21:36:14 Re: Non-transactional pg_class, try 2

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2006-06-26 21:43:22 Re: [HACKERS] Overhead for stats_command_string et al, take 2
Previous Message Alvaro Herrera 2006-06-26 21:36:14 Re: Non-transactional pg_class, try 2