X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=m_librarian%2Finp.py;h=e99800a18e13d4ec3fc6ffcefa6915e5699b9642;hb=1129afc4d0d93b43886522af59bacea93ec3d54d;hp=db0a3d834baf41c5bb7a195a12047d2ceb07c3df;hpb=9a81027bd2b57aed7940c1e1812cf885925cd45b;p=m_librarian.git diff --git a/m_librarian/inp.py b/m_librarian/inp.py index db0a3d8..e99800a 100644 --- a/m_librarian/inp.py +++ b/m_librarian/inp.py @@ -68,3 +68,7 @@ def import_inpx(path): inp = inpx.open(name) sqlhub.doInTransaction(import_inp, archive + '.zip', inp) inp.close() + connection = sqlhub.processConnection + if connection.dbName in ('postgres', 'sqlite'): + for table in Author, Book, Extension, Genre, Language: + connection.query("VACUUM %s" % table.sqlmeta.table)