Обсуждение: pg_top

Поиск
Список
Период
Сортировка

pg_top

От
"Brett Maton"
Дата:
<div class="WordSection1"><p class="MsoNormal">Hi List,<p class="MsoNormal"> <p class="MsoNormal">  This might not be
theright place to post, but I’ve got a minor patch for pg_top and would like to submit it for review.<p
class="MsoNormal"> <pclass="MsoNormal">  Basically, the rpm version in the repositories pg_top92-3.6.2 doesn’t work
withPostgres 9.2<p class="MsoNormal">  <p class="MsoNormal">#define QUERY_PROCESSES \<p class="MsoNormal">             
  "SELECTprocpid\n" \<p class="MsoNormal">                "FROM pg_stat_activity;"<p class="MsoNormal"> <p
class="MsoNormal">Itappears that procpid has been renamed to pid at some point, also the column current_query appears
tohave been shortened to query.<p class="MsoNormal">My patch updates a couple of queries to use the new shorter column
names.<pclass="MsoNormal"> <p class="MsoNormal">Where or who should  I submit the changes to?<p class="MsoNormal"> <p
class="MsoNormal">Thanks,<pclass="MsoNormal">Brett<div align="center" class="MsoNormal" style="text-align:center"><span
style="mso-fareast-language:EN-GB"><hralign="center" size="1" width="100%" /></span></div><table border="0"
cellpadding="0"class="MsoNormalTable" style="margin-left:2.25pt"><tr style="height:74.8pt"><td
style="width:202.5pt;padding:.75pt.75pt .75pt .75pt;height:74.8pt" valign="top" width="270"><p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"CourierNew";mso-fareast-language:EN-GB">Brett Maton<br />t:
+44 (0) 2392 658 264<br/>m: +44 (0) 7427 610 472<br />e: <a href="mailto:matonb@ltresources.co.uk"><span
style="color:blue">matonb@ltresources.co.uk</span></a></span></td><tdstyle="width:225.0pt;padding:.75pt .75pt .75pt
.75pt;height:74.8pt"valign="top" width="300"><p align="right" class="MsoNormal" style="text-align:right"><a
href="http://www.ltresources.co.uk/"><spanstyle="font-size:10.0pt;font-family:"Courier
New";color:blue;mso-fareast-language:EN-GB;text-decoration:none"><imgalt="Description:
http://www.ltresources.co.uk/logow.png"border="0" height="58" id="_x0000_i1026"
src="cid:image003.png@01CDDEAC.0973AF10"width="404" /></span></a><span style="font-size:10.0pt;font-family:"Courier
New";mso-fareast-language:EN-GB"></span></td></tr></table><pclass="MsoNormal"><span
style="mso-fareast-language:EN-GB"> </span><pclass="MsoNormal"> </div> 

Re: pg_top

От
"P. Christeas"
Дата:
On Thursday 20 December 2012, Brett Maton wrote:
> Hi List,
> 
> 
> 
>   This might not be the right place to post, but I've got a minor patch for
> pg_top and would like to submit it for review.
> 
> 
This project lies on Github:
https://github.com/markwkm/pg_top/

I think, this commit had fixed the issue you are talking about:
https://github.com/markwkm/pg_top/commit/a211ac3f161d7ec2752ed038009f93b4f470e86c



-- 
Say NO to spam and viruses. Stop using Microsoft Windows!



Re: pg_top

От
"Brett Maton"
Дата:
Ah, I cloned the repository from git://git.postgresql.org/
 I'll have a look at Marks repo.

Thanks,
Brett

-----Original Message-----
From: pgsql-hackers-owner@postgresql.org
[mailto:pgsql-hackers-owner@postgresql.org] On Behalf Of P. Christeas
Sent: 20 December 2012 12:33
To: pgsql-hackers@postgresql.org
Subject: Re: [HACKERS] pg_top

On Thursday 20 December 2012, Brett Maton wrote:
> Hi List,
> 
> 
> 
>   This might not be the right place to post, but I've got a minor 
> patch for pg_top and would like to submit it for review.
> 
> 
This project lies on Github:
https://github.com/markwkm/pg_top/

I think, this commit had fixed the issue you are talking about:
https://github.com/markwkm/pg_top/commit/a211ac3f161d7ec2752ed038009f93b4f47
0e86c



--
Say NO to spam and viruses. Stop using Microsoft Windows!


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers




Re: pg_top

От
John R Pierce
Дата:
<div class="moz-cite-prefix">On 12/20/2012 4:17 AM, Brett Maton wrote:<br /></div><blockquote
cite="mid:023c01cddeac$0ab64130$2022c390$@ltresources.co.uk"type="cite"><p class="MsoNormal">It appears that procpid
hasbeen renamed to pid at some point, also the column current_query appears to have been shortened to query.<p
class="MsoNormal">Mypatch updates a couple of queries to use the new shorter column names.</blockquote><br /><br />
IMHO,any such fix should check the version, and use the old name for < 9.2, and new for >= 9.2<br /><br /> /me
tossedanother mumbled curse at whomever changed that field name.<br /><br /><br /> 

Re: pg_top

От
Tom Lane
Дата:
John R Pierce <pierce@hogranch.com> writes:
> /me tossed another mumbled curse at whomever changed that field name.

The reason for the field name change was that the semantics of the field
changed.  You typically ought to look at what the application is
actually doing with the field, not just do s/current_query/query/g
and expect that all will be well.  (In particular, if the app is looking
for "idle" or "idle in transaction" state markers, it's going to need
more adjustment than that.)
        regards, tom lane



Re: pg_top

От
Merlin Moncure
Дата:
On Thu, Dec 20, 2012 at 4:17 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> John R Pierce <pierce@hogranch.com> writes:
>> /me tossed another mumbled curse at whomever changed that field name.
>
> The reason for the field name change was that the semantics of the field
> changed.  You typically ought to look at what the application is
> actually doing with the field, not just do s/current_query/query/g
> and expect that all will be well.  (In particular, if the app is looking
> for "idle" or "idle in transaction" state markers, it's going to need
> more adjustment than that.)

IMSNHO, neither of these should have been changed, I would much rather
have seen a new view or some other way of opting into the new
functionality.

merlin



Re: pg_top

От
"Brett Maton"
Дата:
As it turns out Mark Wong's pg_top project / branch
https://github.com/markwkm/pg_top/ has been patched and looks like it will
cope with the current column names and their previous incarnation.

I don't think I would ever have found it unless P. Christeas had pointed it
out.  I cloned the source from git.postgresql.org which I assumed would be
the latest code....
Google searches point you mostly to pgfoundry, which seems to be out of date
(pg_top that is) and most links in the foundry take you to a "page not
found".

I suppose the question now is git.postgresql.org where I should expect to
find the latest code, stable or otherwise...

Thanks,
Brett

-----Original Message-----
From: pgsql-hackers-owner@postgresql.org
[mailto:pgsql-hackers-owner@postgresql.org] On Behalf Of Merlin Moncure
Sent: 20 December 2012 22:24
To: Tom Lane
Cc: John R Pierce; pgsql-hackers@postgresql.org
Subject: Re: [HACKERS] pg_top

On Thu, Dec 20, 2012 at 4:17 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> John R Pierce <pierce@hogranch.com> writes:
>> /me tossed another mumbled curse at whomever changed that field name.
>
> The reason for the field name change was that the semantics of the 
> field changed.  You typically ought to look at what the application is 
> actually doing with the field, not just do s/current_query/query/g and 
> expect that all will be well.  (In particular, if the app is looking 
> for "idle" or "idle in transaction" state markers, it's going to need 
> more adjustment than that.)

IMSNHO, neither of these should have been changed, I would much rather have
seen a new view or some other way of opting into the new functionality.

merlin


--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make
changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers