Re: maintenance_work_mem and autovacuum - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: maintenance_work_mem and autovacuum
Date
Msg-id 1238102628.16568.553.camel@ebony.2ndQuadrant
Whole thread Raw
In response to Re: maintenance_work_mem and autovacuum  (Josh Berkus <josh@agliodbs.com>)
Responses Re: maintenance_work_mem and autovacuum  (Josh Berkus <josh@agliodbs.com>)
Re: maintenance_work_mem and autovacuum  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Thu, 2009-03-26 at 13:43 -0700, Josh Berkus wrote:
> > I agree with Magnus' original reasoning: we can have more than one
> > autovacuum process, so we may have autovacuum_max_workers active and so
> > the work mem they use must be smaller. For maintenance_work_mem we would
> > typically only have one session using it at any time, so we either have
> > to start hardcoding the value in scripts or accept the fact it has been
> > set lower.
> 
> I actually have a client who does both automated and manual vacuums. 
> Having two settings would definitely be convenient for them.
> 
> That said, it would be unnecessary if I could use ROLES to set 
> parameters more reliably ....

Hmmm, perhaps the right way to do this is to have a user called
"autovacuum" that is used to perform autovacuums. 

That way we can actually get rid of a few autovacuum_* parameters
without losing function, and yet add the capability to change
maintenance_work_mem just for autovacuum. Avoid some special case code
also, like setting of zero_damaged_pages.

Seems like a nice small change for 8.4?

-- Simon Riggs           www.2ndQuadrant.comPostgreSQL Training, Services and Support



pgsql-hackers by date:

Previous
From: Jeff Davis
Date:
Subject: Re: GIN versus zero-key queries
Next
From: Josh Berkus
Date:
Subject: Re: maintenance_work_mem and autovacuum