gnumed-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnumed-devel] Querying who are the logged-into-GNUmed users?


From: Karsten Hilbert
Subject: Re: [Gnumed-devel] Querying who are the logged-into-GNUmed users?
Date: Thu, 8 Aug 2013 22:10:36 +0200 (CEST)

> I noticed, after I had logged into GNUmed using debug = 'on',  when I then 
> did in psql
> 
>       SELECT usesysid, usename FROM pg_stat_activity;
> 
> (which BTW can also be run within the GNUmed "Reports" plugin) I got back
> 
>        ----------+---------
>       16403 | gm-dbo
>       81511 | jabu
>       81511 | jabu 
> 
> however even after I quit the client and re-launched GNUmed *not* in debug 
> mode, I still got the same result. What is accounting for the second 
> instance? Is it to do with logging, or with multiple threads (a read and a 
> write), per-user? 

At all times there will be one thread listening for signals from the database
and one connection, cached, open, in the main thread, waiting for readonly 
queries.

Readwrite connections are only ever opened on demand (and would be a third one 
showing up briefly)
and live only a few milliseconds if that.

Karsten



reply via email to

[Prev in Thread] Current Thread [Next in Thread]