Hello Shailendra,
There are a couple of ways:

1) Use the postgres vacuum command.  Vacuum is the postgres garbage collector 
and will reclaim dead tuples.  A regular vacuum will not free up the space to 
the file system but will make the space available for future uploads.  A vacuum 
full will return the space to the file system but then it will have to be 
reallocated on your next upload.

2) Delete uploads that you are done with  (Organize > Uploads > Delete Uploaded 
file).  Then  run vacuum.

Bob Gobeille


On Mar 14, 2014, at 7:40 AM, Shailendra Mudgal <[email protected]> 
wrote:

> Hi Everyone,
> 
> I have fossology setup running for license audit. But within a month i see 
> the database size growing exponentially.
> 
> These are the top 20 tables taking up space.
> 
> fossology=> SELECT nspname || '.' || relname AS "relation",
> fossology->     pg_size_pretty(pg_relation_size(C.oid)) AS "size"
> fossology->   FROM pg_class C
> fossology->   LEFT JOIN pg_namespace N ON (N.oid = C.relnamespace)
> fossology->   WHERE nspname NOT IN ('pg_catalog', 'information_schema')
> fossology->   ORDER BY pg_relation_size(C.oid) DESC
> fossology->   LIMIT 20;
>              relation              |  size
> -----------------------------------+--------
>  public.uploadtree_a               | 358 MB
>  public.uploadtree_a_parent_idx    | 215 MB
>  public.uploadtree_a_pkey          | 208 MB
>  public.uploadtree_a_lft_idx       | 158 MB
>  public.uploadtree_a_upload_fk_idx | 158 MB
>  public.uploadtree_a_pfile_fk_idx  | 138 MB
>  public.md5_sha1_size              | 55 MB
>  public.uploadtree_540             | 49 MB
>  public.uploadtree_529             | 49 MB
>  public.uploadtree_544             | 49 MB
>  public.uploadtree_499             | 45 MB
>  public.uploadtree_497             | 45 MB
>  public.uploadtree_508             | 45 MB
>  public.uploadtree_506             | 45 MB
>  public.uploadtree_501             | 45 MB
>  public.uploadtree_503             | 45 MB
>  public.uploadtree_634             | 45 MB
>  public.uploadtree_635             | 45 MB
>  public.uploadtree_639             | 44 MB
>  public.uploadtree_637             | 44 MB
> (20 rows)
> 
> 
> How can i trim this space. 
> 
> Thanks,
> Shailendra

_______________________________________________
fossology mailing list
[email protected]
http://lists.fossology.org/mailman/listinfo/fossology

Reply via email to