Thread: Restore rather than rebuild index ?

Restore rather than rebuild index ?

From
A J
Date:
During restore of a database (from a full backup), the general practice is to rebuild the indexes. I think with pg_dump and pg_restore (or psql restore), the only option is to rebuild the indexes. Am I right or is it possible to backup indexes as well and restore them ?
Just exploring, to figure if time to rebuild a fully functional database (with indexes) can be lower one way or the other.

Thank you,
AJ

Re: Restore rather than rebuild index ?

From
"Kevin Grittner"
Date:
A J <s5aly@yahoo.com> wrote:

> I think with pg_dump and pg_restore (or psql restore), the only
> option is to rebuild the indexes. Am I right or is it possible to
> backup indexes as well and restore them ?

With pg_dump it is copying in rows by value, so indexes must then be
built.  If you use PITR backups, it is a block-by-block copy of the
files, including indexes -- no index rebuild is needed for that
technique.

-Kevin