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

ktm at rice.edu ktm at rice.edu
Tue Jul 9 08:46:00 EDT 2013


On Tue, Jul 09, 2013 at 12:02:17PM +0800, Craig Ringer wrote:
> On 07/07/2013 08:21 PM, Alex Decalli wrote:
> > Hello everybody
> > I want to cleanup my session table, it is already about 1 Gigabyte! I hit:
> > 
> > me at myserver:~$ sudo rt-clean-sessions --debug --older 1M
> 
> That reminds me - is there any reason RT would get upset if the sessions
> table was suddenly empty after a restart?
> 
> I'm wondering if it should be an UNLOGGED table on PostgreSQL 9.1 and
> above, so it doesn't incur write-ahead logging overhead. If it doesn't
> need to be crash-safe and it's OK to just have it truncated after a
> crash recovery restart, that'd be ideal.
> 
> Thoughts?
> 
Hi Craig,

Truncating the table does not cause any problems. Everyone will just need
to login again. UNLOGGED is okay unless you want to be able to failover
to a DB replica in which case you want them logged to have the backup
DB updated.

Regards,
Ken



More information about the rt-users mailing list