On Wed, Dec 18, 2013 at 4:24 AM, Campbell, Lance <lance@xxxxxxxxxxxx> 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). ^^