Lists: | pgsql-hackers |
---|
From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org> |
Subject: | Weird idea for pg_stat_activity |
Date: | 2006-08-15 05:29:02 |
Message-ID: | 200608150529.k7F5T2107696@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Wouldn't it be weird if an update to pg_stat_activity.current_query
actually ran that query for the selected backend:
UPDATE pg_stat_activity SET current_query = "SELECT 1"
WHERE procpid = 19522;
--
Bruce Momjian bruce(at)momjian(dot)us
EnterpriseDB http://www.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
From: | "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com> |
---|---|
To: | Bruce Momjian <bruce(at)momjian(dot)us> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org> |
Subject: | Re: Weird idea for pg_stat_activity |
Date: | 2006-08-15 14:52:03 |
Message-ID: | 20060815145202.GN27928@pervasive.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On Tue, Aug 15, 2006 at 01:29:02AM -0400, Bruce Momjian wrote:
> Wouldn't it be weird if an update to pg_stat_activity.current_query
> actually ran that query for the selected backend:
>
> UPDATE pg_stat_activity SET current_query = "SELECT 1"
> WHERE procpid = 19522;
Interesting thought, though the trick would be having enough control to
be able to inject a query at the right point in the backend's
execution... maybe if there was some kind of 'debug mode' akin to gdb or
the like. Certainly seems like this could be very handy for
trouble-shooting an application you don't have the source for (or one
where the source was such spaghetti that it didn't help much).
--
Jim C. Nasby, Sr. Engineering Consultant jnasby(at)pervasive(dot)com
Pervasive Software http://pervasive.com work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461
From: | Josh Berkus <josh(at)agliodbs(dot)com> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Cc: | Bruce Momjian <bruce(at)momjian(dot)us> |
Subject: | Re: Weird idea for pg_stat_activity |
Date: | 2006-08-16 05:39:24 |
Message-ID: | 200608152239.24370.josh@agliodbs.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Bruce,
> Wouldn't it be weird if an update to pg_stat_activity.current_query
> actually ran that query for the selected backend:
Wierd? Yes. Useful? No.
--
Josh Berkus
PostgreSQL @ Sun
San Francisco