Re: Custom vacuum

From: Fabrízio de Royes Mello <fabriziomello(at)gmail(dot)com>
To: Fábio Gibon - Comex System <gibon(at)comexsystem(dot)com(dot)br>
Cc: PostgreSQL - mailing list <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Custom vacuum
Date: 2010-07-21 12:16:51
Message-ID: AANLkTikucolWEip6lA27dQzcVRCwgmTT_HO3iFVCr196@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

2010/7/20 Fábio Gibon - Comex System <gibon(at)comexsystem(dot)com(dot)br>

> I want perform VACUUM on specific tables. This tables are result of query
> in my database (select tablename from mytablesvacuum). I tryed use a cursor
> on function, but i receive message that vacuun can't run in function.
>
> Any idea to do this?
>
>

Try this:

psql -U postgres -A -t your_database_name -c "SELECT 'VACUUM
'||tablename||';' FROM mytablesvacuum" | psql -U postgres your_database_name

Best regards,
--
Fabrízio de Royes Mello
>> Blog sobre TI: http://fabriziomello.blogspot.com

In response to

  • Custom vacuum at 2010-07-20 18:34:50 from Fábio Gibon - Comex System

Browse pgsql-admin by date

  From Date Subject
Next Message a f 2010-07-22 13:41:03 Restore a backup to a different disk?
Previous Message Robert Voinea 2010-07-21 05:56:14 Re: Weird sorting order