id,summary,reporter,owner,description,type,status,component,version,severity,resolution,keywords,cc,stage,has_patch,needs_docs,needs_tests,needs_better_patch,easy,ui_ux 5086,testing on postgres_psycopg2 tries to truncate tsearch2 tables,shaunc ,Adrian Holovaty,"I'm using tsearch2 together with django. Tsearch2 adds some special tables to the template database which are automatically created in each new database. So they don't get mixed up or deleted, I leave the user as ""postgres"" -- not owned by the user that django connects via. This works fine... except that during testing the (django) test cases ""truncate"" all tables including the tsearch2 tables. These tables shouldn't be truncated, and (since django is not the owner to prevent just this sort of thing) the command fails. I have solved in patch by having django.db.backends.postgresql_psychopg2.introspection.get_table_list return by default only tables that are owned by the current_user. I think this is a reasonable default in general, because other tables are likely to be not the concern of django anyway. - Shaun Cutts",,closed,"Database layer (models, ORM)",dev,,fixed,,shaun@…,Unreviewed,1,0,0,0,0,0