Thread: reindexdb script required in 8.1?

reindexdb script required in 8.1?

From
David Wall
Date:
I've upgraded from 8.0 to 8.1 and want to be sure I'm making the changes
that are required.

For my backups, I have removed the option --blobs because it says this
is no longer needed.  I guess the backup automatically includes blobs now?

I have also been running the contributed 'reindexdb' script by Shaun
Thomas in my backups.  Is that still necessary?  It does not appear to
be part of the contrib area anymore.

Also, my backup scripts still run vacuumlo.  I rebuilt that in 8.1 and
am using that.  Is that still required or is vacuumlo part of the new
8.1 vacuum capabilities?

Lastly, do I still need to run vacuum analyze from time to time update
my stats, or is that done automatically?  I read about how some vacuums
are automatic, but it's not clear if this auto-vacuum is activated by
default or not and I'm not sure how I specify that I want this to occur.

Thanks,
David


Re: reindexdb script required in 8.1?

From
Jim Nasby
Date:
On Mar 7, 2006, at 8:06 PM, David Wall wrote:

> I've upgraded from 8.0 to 8.1 and want to be sure I'm making the
> changes that are required.
>
> For my backups, I have removed the option --blobs because it says
> this is no longer needed.  I guess the backup automatically
> includes blobs now?

You do periodically test your recovery process, right? If not, now's
a good time to start. :) I don't know off-hand if blobs are
automatically included, but the release notes should tell you. If
you're using SQL dumps you could also just look.

> I have also been running the contributed 'reindexdb' script by
> Shaun Thomas in my backups.  Is that still necessary?  It does not
> appear to be part of the contrib area anymore.

AFAIK all functionality of that script is included in the built-in
REINDEX now. In particular REINDEX DATABASE was changed to vacuum
user tables instead of system tables. See also http://
www.postgresql.org/docs/8.1/interactive/sql-reindex.html

BTW, are you sure you need to do that? Index bloat is far less of a
problem now than it used to be, especially if you're vacuuming
frequently enough.

> Also, my backup scripts still run vacuumlo.  I rebuilt that in 8.1
> and am using that.  Is that still required or is vacuumlo part of
> the new 8.1 vacuum capabilities?

Hrm, dunno. Check the release notes. If it's still in 8.1 contrib I'd
bet it's not built-in though.

> Lastly, do I still need to run vacuum analyze from time to time
> update my stats, or is that done automatically?  I read about how
> some vacuums are automatic, but it's not clear if this auto-vacuum
> is activated by default or not and I'm not sure how I specify that
> I want this to occur.

contrib/pgautovacuum is now built in, with expanded capabilities, but
you have to specifically enable it. I'd also drop the thresholds to
0.2 and 0.1 (vacuum/analyze) and drop the limits from 1000/500 to
300/150.
--
Jim C. Nasby, Sr. Engineering Consultant      jnasby@pervasive.com
Pervasive Software      http://pervasive.com    work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf       cell: 512-569-9461