Re: vacuumdb for schema only

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




2010/9/7 Isabella Ghiurea <isabella.ghiurea@xxxxxxxxxxxxxx>
Hi List,
I would like to know if there is an option to run full vacuumdb  for a specific schema only, I see there is  option for tables or whole db .


No, but you can do like this using "psql" :

psql -U postgres -t -A -c "select 'VACUUM '||table_schema||'.'||table_name||';' from information_schema.tables where table_schema = 'public'" bdteste | psql -U postgres bdteste

The example above will run VACUUM to all tables in schema called 'public' in 'bdteste' database.

Best regards,

--
Fabrízio de Royes Mello
>> Blog sobre TI: http://fabriziomello.blogspot.com
>> Perfil Linkedin: http://br.linkedin.com/in/fabriziomello


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux