Why not place the pid of the process into your session and set up a
cronjob to look at pg_listner and delete any pid's from the session
file that have gone away? Only down side is if you recycle pid's
really quickly. Alvaro Herrera wrote: On Fri, Nov 07, 2003 at 07:33:47PM -0800, Boris Popov wrote: Boris,AH> (I don't remember why you rejected the idea of having a cron job to AH> delete entries belonging to expired sessions ...) Reason I'm trying to find a different solution is to avoid implementing application heartbeat that updates the timestamp.I don't think there's another way because you'd need the "trigger on disconnect" or some such that doesn't exist (yet). |