Re: vacuumdb for schema only
От | Fabrízio de Royes Mello |
---|---|
Тема | Re: vacuumdb for schema only |
Дата | |
Msg-id | AANLkTinMzvVZAvADjnH-2a=ph2eZSJQvo80WLetqDH0Y@mail.gmail.com обсуждение исходный текст |
Ответ на | vacuumdb for schema only (Isabella Ghiurea <isabella.ghiurea@nrc-cnrc.gc.ca>) |
Ответы |
Re: vacuumdb for schema only
|
Список | pgsql-admin |
2010/9/7 Isabella Ghiurea <isabella.ghiurea@nrc-cnrc.gc.ca>
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.
--
Fabrízio de Royes Mello
>> Blog sobre TI: http://fabriziomello.blogspot.com
>> Perfil Linkedin: http://br.linkedin.com/in/fabriziomello
В списке pgsql-admin по дате отправления: