[rt-users] RT session cleanup - session table size

Kevin Falcone falcone at bestpractical.com
Tue Jul 9 13:07:30 EDT 2013


On Tue, Jul 09, 2013 at 03:23:53PM +0800, Craig Ringer wrote:
> On 07/09/2013 03:05 PM, Alex Decalli wrote:
> > I think there is no such table.
> 
> There certainly is. From my PostgreSQL logs on the database that RT is
> using:
> 
>     UPDATE sessions SET a_session = $1 WHERE id = $2
> 
> with a giant binary blob as $1"
> 
>     DETAIL:  parameters: $1 = 'BQgDAAAACQQRD1
> 
> RT should really be using DBD::Pg's native bytea support on PostgreSQL,
> not base64-encoding binary for storing in the database, btw, something like:
> 
>   $rv = $sth->bind_param($param_num, $bind_value,
>                          { pg_type => DBD::Pg::PG_BYTEA });

RT uses Apache::Session which is what is storing things in the
session table in the database.

We document that you shouldn't bother backing up the session table.

Setting it to disappear on restart should be fine as long as your
users are ok with being logged out and your external processes aren't
storing session ids and trying to use them rather than logging in
(a surprisingly common failure case).

-kevin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 235 bytes
Desc: not available
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20130709/13376c35/attachment.sig>


More information about the rt-users mailing list