Re: vacuumdb for schema only

Поиск
Список
Период
Сортировка
От Bèrto ëd Sèra
Тема Re: vacuumdb for schema only
Дата
Msg-id AANLkTi=-e5RNzSgBsny80eCac=eLLWomhh0KsqviKeJX@mail.gmail.com
обсуждение исходный текст
Ответ на Re: vacuumdb for schema only  (Fabrízio de Royes Mello <fabriziomello@gmail.com>)
Ответы Re: vacuumdb for schema only  (Fabrízio de Royes Mello <fabriziomello@gmail.com>)
Список pgsql-admin
Hi!

I would also expect you to be able to make a Stored Procedure executing the same command, although I never tried it myself.

Bèrto

On 8 September 2010 03:17, Fabrízio de Royes Mello <fabriziomello@gmail.com> wrote:

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.

Best regards,

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



--
==============================
Constitution du 24 juin 1793 - Article 35. - Quand le gouvernement viole les droits du peuple, l'insurrection est, pour le peuple et pour chaque portion du peuple, le plus sacré des droits et le plus indispensable des devoirs.

В списке pgsql-admin по дате отправления:

Предыдущее
От: Jesper Krogh
Дата:
Сообщение: Re: [NOVICE] - SAN/NAS/DAS - Need advises
Следующее
От: Thomas Uzunoff
Дата:
Сообщение: PostgreSQL article online - PDF