Re: script to drop and create all indexes in a database with parameter concurrently

Поиск
Список
Период
Сортировка
От Doom.zhou
Тема Re: script to drop and create all indexes in a database with parameter concurrently
Дата
Msg-id CAK=muZv5yG3t=Gr1sBNiXvXNyoboVvUW_n1b9Xfg4axniobS2g@mail.gmail.com
обсуждение исходный текст
Ответ на script to drop and create all indexes in a database with parameter concurrently  ("Campbell, Lance" <lance@illinois.edu>)
Ответы Re: script to drop and create all indexes in a database with parameter concurrently
Список pgsql-admin



On Wed, Dec 18, 2013 at 4:24 AM, Campbell, Lance <lance@illinois.edu> wrote:

Below is a Linux script I wrote that will drop and create all of the indexes for your database with the “concurrently” parameter.

 

#!/bin/sh

 

dbhost=localhost

database=somedatabasename

dbschema=/tempfile/dbschema.txt

filtered=/tempfile/dbschema_filtered.txt

sql=/tempfile/rebuild_indexes.sql

 

rm "$dbschema"

rm "$filtered"

rm "$sql"

 

pg_dump -s -h "$dbhost" "$database" > "$dbschema"



 Great script !  
i think you can add parallel perform each couple (drop & create index).  ^^

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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Notice about psql !
Следующее
От: "Doom.zhou"
Дата:
Сообщение: Re: script to drop and create all indexes in a database with parameter concurrently