Re: [GENERAL] "FATAL 1: my bits moved right off the end of theworld!"

Поиск
Список
Период
Сортировка
От Moray McConnachie
Тема Re: [GENERAL] "FATAL 1: my bits moved right off the end of theworld!"
Дата
Msg-id 000c01bf3cd8$2159a9b0$760e01a3@oucs.ox.ac.uk
обсуждение исходный текст
Ответ на Re: [GENERAL] "FATAL 1: my bits moved right off the end of theworld!"  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-general
With all this talk of rebuilding indices, the following script does it
for me:

#!/bin/sh
pg_dump -s databasename > filename
perl -pi -e 'unless (/CREATE.*INDEX/) {s/.*//;chomp;}' filename
perl -pi.create -e 's/CREATE.*?INDEX(.*?\s)ON.*/DROP INDEX$1\;/i;'
filename
mv filename filename.drop
psql -d databasename -c '\i filename.drop'
psql -d databasename -c '\i filename.create'

Of course there are bound to be a million ways of scripting this
without perl, but using awk or similar.

You could cron this up - I don't know if regular rebuilding
of indices helps minimise corruption?

Yours,
Moray

----------------------------------------------------------------------
----------------
Moray.McConnachie@computing-services.oxford.ac.uk


Вложения

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

Предыдущее
От: ^chewie
Дата:
Сообщение: Re: [GENERAL] postgres libpq library
Следующее
От:
Дата:
Сообщение: Re: [GENERAL] Except operation