On Fri, 04 Feb 2011 21:37:56 +0100, Shaun Thomas <stho...@peak6.com> wrote:

On 02/04/2011 02:14 PM, felix wrote:

oh and there in the footnotes to django they say "dont' forget to run
the delete expired sessions management every once in a while".
thanks guys.

Oh Django... :)

it won't run now because its too big, I can delete them from psql though

You might be better off deleting the inverse. You know, start a transaction, select all the sessions that *aren't* expired, truncate the table, insert them back into the session table, and commit.

Note that for a session table, that is updated very often, you can use the postgres' HOT feature which will create a lot less dead rows. Look it up in the docs.

--
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance

Reply via email to