Re: Temp rows - is it possible? - Mailing list pgsql-general

From Boris Popov
Subject Re: Temp rows - is it possible?
Date
Msg-id 84363973255.20031107142340@procedium.com
Whole thread Raw
In response to Temp rows - is it possible?  (Boris Popov <boris@procedium.com>)
Responses Re: Temp rows - is it possible?
List pgsql-general
Hello Dennis,

Friday, November 7, 2003, 1:29:32 PM, you wrote:

DG> Boris Popov wrote:

>>Hello pgsql-general,
>>
>>I'm trying to implement a table with rows that are automatically
>>deleted when the session that inserted them disconnects, sort of like
>>our own alternative to pg_stat_activity. Is it possible and what
>>approach should I be trying to achieve such a thing?
>>

DG> who do you want it visible to? If you don't want it visible to
DG> anybody but the session you are writing them from, just don't
DG> commit them and use the right kind of transaction that allows you
DG> to see them from the session you are in.

I do want them to be visible to everybody. This is a sessions pool,
where sessions are inserted when our app connects and removed when it
disconnects, however this would only work for graceful disconnects,
which we all know isn't always the case. So I want a table that is
somehow notified of a session disconnect and deletes rows created by
that session.

Any ideas?

--
-Boris



pgsql-general by date:

Previous
From: "Edwin Quijada"
Date:
Subject: Re: Recovery Data Cant Be!!!
Next
From: "Edwin Quijada"
Date:
Subject: Re: Recovery Data Cant Be!!!