Thread: Finding active connections to postmaster
I want to list which users are conected to postmaster and what they are doing. I guess I have overseen something but I wasn't able to find any information on doing this in the handbook, FAQ or mailinglist archives. Is it possible to list active connectons? How? drt -- "Before the Internet, a certain breed of deconstructionists had a lot of fun telling everybody that "privileging of dominant paradigms" was wrecking the world. The Internet has taught us that privileging certain views is absolutely crucial to avoid drowning in the ravings of idiots." -Keunwoo Lee
On 27 Sep 2001 10:22:02 +0200 drt@un.bewaff.net (Doobee R. Tzeck) wrote: > > I want to list which users are conected to postmaster and what > they are doing. I guess I have overseen something but I wasn't > able to find any information on doing this in the handbook, FAQ > or mailinglist archives. > > Is it possible to list active connectons? How? to list active connection, you can try this command in shell prompt [bramsi@al-quds bramsi]$ ps ax | grep postgres | grep -v grep | grep -v psql | awk -F " " {'print $7'} postgres but i'm sorry, i do not know what they are doing rigth now. Hope can help you. Best regards, Bramsi Prenata
On 27 Sep 2001, at 10:22, Doobee R. Tzeck wrote: > > I want to list which users are conected to postmaster and what > they are doing. I guess I have overseen something but I wasn't > able to find any information on doing this in the handbook, FAQ > or mailinglist archives. > > Is it possible to list active connectons? How? > > drt ps aux |grep postgres Mark
drt@un.bewaff.net (Doobee R. Tzeck) writes: > Is it possible to list active connectons? How? 7.2 will have a better solution to this (SELECT * FROM pg_stat_activity). regards, tom lane
> Is it possible to list active connectons? How? > This will give a unique list of the names of those logged on: echo Current users logged onto database: ps ax | grep postgres: | awk '{print $6 | "sort" } ' | uniq This will list the user and what process is being done: ps ax | grep postgres: | awk '{print $6 ":" $9 " on " $7}' HTH, -Tony
Do you know how in PostgreSQL to do the receipt of datas in process of their entering as a programm 'tail-f' or need to check in cycle new records entering every seconds? -- Good luck, Michael Babakov --- e-mail: M.Babakov@sochi.net.ru http://sochi.net.ru/~mike
In article <3BBA0C49.226148@sochi.net.ru>, "Michael B. Babakov" <M.Babakov@sochi.net.ru> wrote: > Do you know how in PostgreSQL to do the receipt of datas in process of > their > entering as a programm 'tail-f' or need to check in cycle new records > entering > every seconds? > Well, this would require a sort of "continuous transaction" against a table, which is a paradox--you only get to see the database at a given point in time BETWEEN other transactions. You probably want to look into the NOTIFY command. The applications writing data could issue a NOTIFY to indicate when they have written a row, and the applications reading data could re-run their query when they receive a NOTIFY event. -- Jeff Boes vox 616.226.9550 Database Engineer fax 616.349.9076 Nexcerpt, Inc. jboes@nexcerpt.com