Audit-trail engine inner-workings

Поиск
Список
Период
Сортировка
От Marcelo de Moraes Serpa
Тема Audit-trail engine inner-workings
Дата
Msg-id 1e5bcefd0708210732p498995bal2da4ad022dcf7ad0@mail.gmail.com
обсуждение исходный текст
Ответы Re: Audit-trail engine inner-workings
Список pgsql-general
Hello list,

Taking this discussion as a base:

http://archives.postgresql.org/pgsql-general/2007-04/msg01034.php

Manuel helped me to develop an audit-trail engine, and even though it works ok, I need to know better its inner workings:
 
From what I understand, the flow is something like this:
   * User sends http request to server to update some record (for example);
   * The application server (tomcat) runs the servlet and the servlet gets a connection from the pool
   * The servlet runs the "set_session_id(integer)" to set a session for this request and saves the current application user in the lookup table (session_id,user_id)
   * The db operation is done (db saved) - the user name is retrieved through a lookup into the table mentioned above by getting this request's session_id by running the "current_session_id" SP

* Each http request gets an instance of a session_id ? Or is it per-connection ?
* Do I really need to call reset_session_id ? Isn't this connection destroyed after it has been used by the application?
* Would it work with an application which does not use a connection pool but a permanent connection (such as desktop apps)?

Thanks in advance!

Marcelo.




  

В списке pgsql-general по дате отправления:

Предыдущее
От: hubert depesz lubaczewski
Дата:
Сообщение: Re: Using oid as pkey
Следующее
От: Ted Byers
Дата:
Сообщение: Re: Audit-trail engine inner-workings