Skip site navigation (1) Skip section navigation (2)

Re: [HACKERS] keeping track of connections

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: brett(at)work(dot)chicken(dot)org (Brett McCormick)
Cc: pgsql-hackers(at)hub(dot)org
Subject: Re: [HACKERS] keeping track of connections
Date: 1998-06-03 04:11:01
Message-ID: 199806030411.AAA26288@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
> 
> 
> I would love a way to keep track of the connections/attempted
> connections to the postmaster.  I'm thinking that when the postmaster
> accept()s a connection, it can just insert a record into a table
> (system catalog or not) with the information, which can be updated
> after the authentication succeeds/fails or whatnot.
> 
> something like 'smbstatus' for the samba system.
> 
> So, my question is: how should I go about doing this?  should I look
> into SPI, which I know nothing about?  or, what..  I don't think the
> catalog cache stuff needs to be changed, it isn't as if this info
> needs to be immediately accessible.

Good question.  Postmaster does not have access to the system tables, so
it can't access them.  You could add a debug option to show it in the
server logs, or add it to the -d2 debug option that already shows SQL
statements.


-- 
Bruce Momjian                          |  830 Blythe Avenue
maillist(at)candle(dot)pha(dot)pa(dot)us              |  Drexel Hill, Pennsylvania 19026
  +  If your life is a hard drive,     |  (610) 353-9879(w)
  +  Christ can be your backup.        |  (610) 853-3000(h)

In response to

Responses

pgsql-hackers by date

Next:From: Brett McCormickDate: 1998-06-03 06:19:03
Subject: Re: [HACKERS] keeping track of connections
Previous:From: Bruce MomjianDate: 1998-06-03 04:09:07
Subject: Re: [HACKERS] dump/reload

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group