From: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: reporting reason for certain locks |
Date: | 2010-11-25 16:35:20 |
Message-ID: | 1290702835-sup-6704@alvh.no-ip.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Excerpts from Tom Lane's message of jue nov 25 13:23:42 -0300 2010:
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> > No, what I was suggesting was taking the existing function:
> > extern void pgstat_report_waiting(bool waiting);
> > ...and instead doing something like this:
> > extern void pgstat_report_waiting(char *reason);
> > ...and then arrange to pass the reason via the eponymous argument.
>
> The question is how many cycles are we willing to expend on preparing a
> reason string that (in approximately 99.9% of the calls) will not be
> of any use. It would be much better to avoid doing this and instead
> expend the extra work on the inspection side.
I'm all for making this cheap -- and your proposal works for tuple
locks (ugly however it may be). But it doesn't work for "snapshot"
locks such as the ones CREATE INDEX CONCURRENTLY takes.
--
Álvaro Herrera <alvherre(at)commandprompt(dot)com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
From | Date | Subject | |
---|---|---|---|
Next Message | Heikki Linnakangas | 2010-11-25 16:44:42 | Re: SQL/MED - core functionality |
Previous Message | Tom Lane | 2010-11-25 16:28:45 | Re: SQL/MED - core functionality |