Thread: Re: Vacuum template databases, Urgent: Production probl

Re: Vacuum template databases, Urgent: Production probl

From
"mcelroy, tim"
Date:

Humm, well I am running 8.0.1 and use that option and see the following in my vacuum output log:

vacuumdb: vacuuming database "template1"

So I would assume that it is being vacuumed?  Maybe I'm wrong.  If so, we should be upgrading soon and it won't be an issue.

Thanks,
Tim

 -----Original Message-----
From:   Jim C. Nasby [mailto:jnasby@pervasive.com]
Sent:   Tuesday, March 14, 2006 4:17 PM
To:     mcelroy, tim
Cc:     'Tom Lane'; pgsql-performance@postgresql.org
Subject:        Re: [PERFORM] Vacuum template databases, Urgent: Production probl

On Tue, Mar 14, 2006 at 12:28:17PM -0500, mcelroy, tim wrote:
> If one adds the '-a' arg to vacuumdb wouldn't that vacuum all databases
> including template1?

It does on 8.1...

decibel@phonebook.1[15:15]~:18%vacuumdb -va | & grep template1
vacuumdb: vacuuming database "template1"
decibel@phonebook.1[15:16]~:19%

Try it and find out.
--
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

Re: Vacuum template databases, Urgent: Production probl

From
"Jim C. Nasby"
Date:
On Tue, Mar 14, 2006 at 04:19:37PM -0500, mcelroy, tim wrote:
> Humm, well I am running 8.0.1 and use that option and see the following in
> my vacuum output log:
>
> vacuumdb: vacuuming database "template1"
>
> So I would assume that it is being vacuumed?  Maybe I'm wrong.  If so, we
> should be upgrading soon and it won't be an issue.

My guess is that vacuumdb -a will vacuum anything that it's allowed to
connect to, which normally means every database except for template0. If
you want the Real Answer, look in the source.
--
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

Re: Vacuum template databases, Urgent: Production probl

From
Vivek Khera
Date:
On Mar 14, 2006, at 4:19 PM, mcelroy, tim wrote:

> Humm, well I am running 8.0.1 and use that option and see the
> following in
> my vacuum output log:
>
> vacuumdb: vacuuming database "template1"
>

it has done so since at least 7.4, probably 7.3.  the "-a" flag
really does what is says.