pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedRe: Determine current running query,
3+ messages / 2 participants
[nested] [flat]
* Re: Determine current running query,
@ 2005-03-29 15:50 Adam Witney <awitney@sghms.ac.uk>
2005-03-29 16:02 ` Re: Determine current running query, Scott Marlowe <smarlowe@g2switchworks.com>
0 siblings, 1 reply; 3+ messages in thread
From: Adam Witney @ 2005-03-29 15:50 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-admin
On 29/3/05 4:27 pm, "Tom Lane" <tgl@sss.pgh.pa.us> wrote:
> Adam Witney <awitney@sghms.ac.uk> writes:
>> Shouldn't there be something in current_query?
>
> Only if (a) you have stats_command_string turned on, *and* (b) you
> are a superuser or the owner of the target process.
I am logged in as the superuser, and I just switched stats_command_string
on. Table now looks like this
bugasbase=# SELECT * from pg_stat_activity ;
datid | datname | procpid | usesysid | usename | current_query |
query_start
----------+-----------+---------+----------+---------+---------------+------
--------------------------
80573819 | bugasbase | 23197 | 1 | pgsql | <IDLE> |
29/03/2005 17:03:25.911288 BST
80573819 | bugasbase | 23195 | 109 | lubrook | |
I did find a reference on google to the fact that there was/is a max query
size length for this? I think this was for 7.3.5, is this still the case?
Maybe this is the reason it is not showing up (it is quite a large query
string)?
Thanks
Adam
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Determine current running query,
2005-03-29 15:50 Re: Determine current running query, Adam Witney <awitney@sghms.ac.uk>
@ 2005-03-29 16:02 ` Scott Marlowe <smarlowe@g2switchworks.com>
0 siblings, 0 replies; 3+ messages in thread
From: Scott Marlowe @ 2005-03-29 16:02 UTC (permalink / raw)
To: Adam Witney <awitney@sghms.ac.uk>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; pgsql-admin
On Tue, 2005-03-29 at 09:50, Adam Witney wrote:
> On 29/3/05 4:27 pm, "Tom Lane" <tgl@sss.pgh.pa.us> wrote:
>
> > Adam Witney <awitney@sghms.ac.uk> writes:
> >> Shouldn't there be something in current_query?
> >
> > Only if (a) you have stats_command_string turned on, *and* (b) you
> > are a superuser or the owner of the target process.
>
> I am logged in as the superuser, and I just switched stats_command_string
> on. Table now looks like this
>
> bugasbase=# SELECT * from pg_stat_activity ;
> datid | datname | procpid | usesysid | usename | current_query |
> query_start
> ----------+-----------+---------+----------+---------+---------------+------
> --------------------------
> 80573819 | bugasbase | 23197 | 1 | pgsql | <IDLE> |
> 29/03/2005 17:03:25.911288 BST
> 80573819 | bugasbase | 23195 | 109 | lubrook | |
>
> I did find a reference on google to the fact that there was/is a max query
> size length for this? I think this was for 7.3.5, is this still the case?
> Maybe this is the reason it is not showing up (it is quite a large query
> string)?
You might want to post your reference. There hasn't been a built-in
query length limit for quite some time now. MySQL's benchmark, by the
way, erroneously listed postgresql as having a 16 meg max query size
because (tada!) they had a 16 meg buffer allocated in their benchmark
and when it filled up and errored out the size was 16 meg. I don't
believe this was ever fixed, either in their code or in the report they
had for a very long time on their web site. And it was pointed out
again and again, by me.
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Determine current running query,
@ 2005-03-29 16:08 Adam Witney <awitney@sghms.ac.uk>
0 siblings, 0 replies; 3+ messages in thread
From: Adam Witney @ 2005-03-29 16:08 UTC (permalink / raw)
To: Scott Marlowe <smarlowe@g2switchworks.com>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; pgsql-admin
On 29/3/05 5:06 pm, "Scott Marlowe" <smarlowe@g2switchworks.com> wrote:
> On Tue, 2005-03-29 at 09:50, Adam Witney wrote:
>> On 29/3/05 4:27 pm, "Tom Lane" <tgl@sss.pgh.pa.us> wrote:
>>
>>> Adam Witney <awitney@sghms.ac.uk> writes:
>>>> Shouldn't there be something in current_query?
>>>
>>> Only if (a) you have stats_command_string turned on, *and* (b) you
>>> are a superuser or the owner of the target process.
>>
>> I am logged in as the superuser, and I just switched stats_command_string
>> on. Table now looks like this
>>
>> bugasbase=# SELECT * from pg_stat_activity ;
>> datid | datname | procpid | usesysid | usename | current_query |
>> query_start
>> ----------+-----------+---------+----------+---------+---------------+------
>> --------------------------
>> 80573819 | bugasbase | 23197 | 1 | pgsql | <IDLE> |
>> 29/03/2005 17:03:25.911288 BST
>> 80573819 | bugasbase | 23195 | 109 | lubrook | |
>>
>> I did find a reference on google to the fact that there was/is a max query
>> size length for this? I think this was for 7.3.5, is this still the case?
>> Maybe this is the reason it is not showing up (it is quite a large query
>> string)?
>
> Note that there is a limit to what gets stored in the table, but I think
> it is the first 255 characters. i.e. you should see something.
Yes you are right, I misunderstood the google reference I found:
http://archives.postgresql.org/pgsql-novice/2004-02/msg00187.php
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2005-03-29 16:08 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-03-29 15:50 Re: Determine current running query, Adam Witney <awitney@sghms.ac.uk>
2005-03-29 16:02 ` Scott Marlowe <smarlowe@g2switchworks.com>
2005-03-29 16:08 Re: Determine current running query, Adam Witney <awitney@sghms.ac.uk>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox