473,799 Members | 2,711 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

pg_stat_activit y 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_activit y during the same time period, I
saw nothing populated in the current_query column...ever.

Am I misunderstandin g what the pg_stat_activit y table is for? I
confirmed that the procpid listed in pg_stat_activit y 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*******@postg resql.org so that your
message can get through to the mailing list cleanly

Nov 23 '05 #1
3 1997
Jeff Amiel <ja****@istream imaging.com> writes:
however, if I checked pg_stat_activit y 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****@istream imaging.com> writes:

however, if I checked pg_stat_activit y 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.ph a.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
4532
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 purposes. I have to admit that, although I'm very familiar with Python, I'm complete Perl noob (and I hope to stay one) which is reflected in my questions. I know that the web offers a lot of resources on Python/Perl differences. But I couldn't find a...
33
5602
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
1982
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
4620
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? thanks in advance, Jaime Casanova (el_vigia)
2
1824
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 ? version: 7.3.4
2
6741
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() {} public static string DataField = string.Empty; } versus
4
2275
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 ============================================================ elein@varlena.com Varlena, LLC www.varlena.com
5
3216
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 at times has returned a value of 0 (when there is obviously still a connection). It's not repeatable, and occurs sporadically. Does anyone have any reason as to why this would be isolated to V8? Is this an acceptable means of obtaining the...
4
8352
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 blahblahblah... where exists (select blah.....) Is one more ANSI than another? Which is most portable?
0
9689
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10495
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10269
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10032
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7573
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6811
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5469
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5597
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4148
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.