473,387 Members | 1,785 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

pg_stat_activity versus ps

I ran a home-grown self continuous stress test tool against my 7.4.2
database.

I banged 'ps' (running freebsd) while it was active and witnessed
several of the 'back end' postgres processes exeucting queries, commits,
inserts, etc....(the actual work the processes were doing was listed in
the 'ps' output)
however, if I checked pg_stat_activity during the same time period, I
saw nothing populated in the current_query column...ever.

Am I misunderstanding what the pg_stat_activity table is for? I
confirmed that the procpid listed in pg_stat_activity was the same as
listed in my 'ps' process list....
Jeff

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ma*******@postgresql.org so that your
message can get through to the mailing list cleanly

Nov 23 '05 #1
3 1977
Jeff Amiel <ja****@istreamimaging.com> writes:
however, if I checked pg_stat_activity during the same time period, I
saw nothing populated in the current_query column...ever.


Did you have it turned on? (stats_command_string config parameter)

Were you checking as superuser?

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Nov 23 '05 #2
That was it. (not having it turned on. duh).
Guess I should have read section 23.2 of the docs..."The Statistics
Collector"
Thanks for the heads up.

Jeff
Tom Lane wrote:
Jeff Amiel <ja****@istreamimaging.com> writes:

however, if I checked pg_stat_activity during the same time period, I
saw nothing populated in the current_query column...ever.


Did you have it turned on? (stats_command_string config parameter)

Were you checking as superuser?

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Nov 23 '05 #3
Jeff Amiel wrote:
That was it. (not having it turned on. duh).
Guess I should have read section 23.2 of the docs..."The Statistics
Collector"


8.0 will give clear output showing it is not turned on our you don't
have permissions.

--
Bruce Momjian | http://candle.pha.pa.us
pg***@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Nov 23 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Dieter Vanderelst | last post by:
Dear all, I'm currently comparing Python versus Perl to use in a project that involved a lot of text processing. I'm trying to determine what the most efficient language would be for our...
33
by: Joshua D. Drake | last post by:
Hello, I think the below just about says it all: http://www.commandprompt.com/images/mammoth_versus_dolphin_500.jpg Sincerely, Joshua Drake
1
by: Carmen Gloria Sepulveda Dedes | last post by:
Hello. I want to query pg_stat_activity to see the current_query field. I do: mdbs=# select current_user; current_user -------------- postgres (1 row)
1
by: Jaime Casanova | last post by:
Hi all, in the pg_stat_activity catalog there is a field called current_query but it is in blank when i modify the show statement stat in postgresql.conf i win nothing. what am i doing wrong? ...
2
by: Rajesh Kumar Mallah | last post by:
Hi , I noticed that an entry in pg_stat_activity was existing for a long duration > 2 mins while its backend ( process corresponding to that procpid) was not running. how can it be possible ?...
2
by: Andrew Robinson | last post by:
I need to create a shared static field for use within a number of different classes. Which one should I be using or are they all really the same thing? public class Widget { private Widget() {}...
4
by: elein | last post by:
The variable names in postgresql.conf have changed in the last several releases. I'm now confused about what variable(s) to set to show the query in pg_stat_activity. Hints? --elein...
5
by: Anony Mous | last post by:
Coming off of 7.4.3 I've always used select count(*) from pg_stat_activity through the ODBC driver to obtain the number of connections to the db. I've found that with v8.0 Beta 1 that this...
4
by: aj | last post by:
DB2 8.2 LUW FP14 Is there any real difference between select blahblahblah... where blah IN (select blah......) versus select blahblahblah... where blah = ANY (select blah.....) versus select...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.