Re: using postgresql for session

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: "john(dot)tiger" <john(dot)tigernassau(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: using postgresql for session
Date: 2015-10-07 17:15:03
Message-ID: 56155317.3030202@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 10/07/2015 08:58 AM, john.tiger wrote:
> has anyone used postgres jsonb for holding session ? Since server side
> session is really just a piece of data, why bother with special
> "session" plugins and just use postgres to hold the data and retrieve it
> with psycopg2 ?

That is how Django does it. It uses the django_session table.

Maybe use some trigger if session changes?

That would seem to the tricky part, determining when a session changes.

We are
> using python Bottle with psycopg2 (super simple, powerful combo) - are
> we missing something magical about session plugins ?

What sort of plugin are you talking about?

>
>

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2015-10-07 17:20:42 Re: How to drop user if objects depend on it
Previous Message Ramalingam, Sankarakumar 2015-10-07 17:02:08 Re: postgres standby won't start