Re: [GENERAL] autovacuum and immediate shutdown issues

2009-10-19 Thread Tom Lane
Brad Nicholson writes: > What about the question that Scott and I both asked - what about query > plans. Will they be affected? No, they should be the same as what you were getting just before the crash. The planner only looks at pg_statistic which is a whole different thing.

Re: [GENERAL] autovacuum and immediate shutdown issues

2009-10-19 Thread Brad Nicholson
On Mon, 2009-10-19 at 15:09 -0400, Brad Nicholson wrote: > On Mon, 2009-10-19 at 15:01 -0400, Tom Lane wrote: > > Brad Nicholson writes: > > > autoanalyze will automatically analyze new tables when they don't have > > > stats. It seems logical that it should handle this case where the table > > >

Re: [GENERAL] autovacuum and immediate shutdown issues

2009-10-19 Thread Brad Nicholson
On Mon, 2009-10-19 at 15:01 -0400, Tom Lane wrote: > Brad Nicholson writes: > > autoanalyze will automatically analyze new tables when they don't have > > stats. It seems logical that it should handle this case where the table > > also does not have stats. > > It will autoanalyze once a sufficie

Re: [GENERAL] autovacuum and immediate shutdown issues

2009-10-19 Thread Tom Lane
Brad Nicholson writes: > autoanalyze will automatically analyze new tables when they don't have > stats. It seems logical that it should handle this case where the table > also does not have stats. It will autoanalyze once a sufficient number of inserts have occurred. The effect of a crash is ju

Re: [GENERAL] autovacuum and immediate shutdown issues

2009-10-19 Thread Brad Nicholson
On Mon, 2009-10-19 at 11:35 -0700, Christophe Pettus wrote: > On Oct 19, 2009, at 11:26 AM, Scott Marlowe wrote: > > That could be a pretty bad worst case scenario for certain types of > > tables / usage patterns. > > Given that (presumably) the database server is not failing repeatedly > withou

Re: [GENERAL] autovacuum and immediate shutdown issues

2009-10-19 Thread Christophe Pettus
On Oct 19, 2009, at 11:26 AM, Scott Marlowe wrote: That could be a pretty bad worst case scenario for certain types of tables / usage patterns. Given that (presumably) the database server is not failing repeatedly without some kind of operator notification, isn't it at least somewhat reaso

Re: [GENERAL] autovacuum and immediate shutdown issues

2009-10-19 Thread Scott Marlowe
On Mon, Oct 19, 2009 at 11:27 AM, Tom Lane wrote: > Scott Marlowe writes: >> All of this is completely besides the point that a database that's >> been shutdown immediately / had the power cord yanked comes back up >> and doesn't start autovacuuming automatically, which seems a >> non-optimal beh

Re: [GENERAL] autovacuum and immediate shutdown issues

2009-10-19 Thread Tom Lane
Scott Marlowe writes: > All of this is completely besides the point that a database that's > been shutdown immediately / had the power cord yanked comes back up > and doesn't start autovacuuming automatically, which seems a > non-optimal behaviour. It'll start as soon as you've modified enough ro

Re: [GENERAL] autovacuum and immediate shutdown issues

2009-10-19 Thread Brad Nicholson
On Mon, 2009-10-19 at 11:16 -0600, Scott Marlowe wrote: > On Mon, Oct 19, 2009 at 11:06 AM, Brad Nicholson > wrote: > > On Mon, 2009-10-19 at 10:53 -0600, Scott Marlowe wrote: > >> On Mon, Oct 19, 2009 at 10:44 AM, Tom Lane wrote: > >> > Brad Nicholson writes: > >> >> On Mon, 2009-10-19 at 12:07

Re: [GENERAL] autovacuum and immediate shutdown issues

2009-10-19 Thread Scott Marlowe
On Mon, Oct 19, 2009 at 11:06 AM, Brad Nicholson wrote: > On Mon, 2009-10-19 at 10:53 -0600, Scott Marlowe wrote: >> On Mon, Oct 19, 2009 at 10:44 AM, Tom Lane wrote: >> > Brad Nicholson writes: >> >> On Mon, 2009-10-19 at 12:07 -0400, Tom Lane wrote: >> >>> That seems like a fundamentally stupi

Re: [GENERAL] autovacuum and immediate shutdown issues

2009-10-19 Thread Brad Nicholson
On Mon, 2009-10-19 at 10:53 -0600, Scott Marlowe wrote: > On Mon, Oct 19, 2009 at 10:44 AM, Tom Lane wrote: > > Brad Nicholson writes: > >> On Mon, 2009-10-19 at 12:07 -0400, Tom Lane wrote: > >>> That seems like a fundamentally stupid idea, unless you are unconcerned > >>> with the time and cost

Re: [GENERAL] autovacuum and immediate shutdown issues

2009-10-19 Thread Scott Marlowe
On Mon, Oct 19, 2009 at 10:44 AM, Tom Lane wrote: > Brad Nicholson writes: >> On Mon, 2009-10-19 at 12:07 -0400, Tom Lane wrote: >>> That seems like a fundamentally stupid idea, unless you are unconcerned >>> with the time and cost of getting the DB running again, which seemingly >>> you are. > >

Re: [GENERAL] autovacuum and immediate shutdown issues

2009-10-19 Thread Tom Lane
Brad Nicholson writes: > On Mon, 2009-10-19 at 12:07 -0400, Tom Lane wrote: >> That seems like a fundamentally stupid idea, unless you are unconcerned >> with the time and cost of getting the DB running again, which seemingly >> you are. > I disagree that this is fundamentally stupid. We are tal

Re: [GENERAL] autovacuum and immediate shutdown issues

2009-10-19 Thread Brad Nicholson
On Mon, 2009-10-19 at 12:07 -0400, Tom Lane wrote: > Brad Nicholson writes: > > If you issue an immediate shutdown to the database, autovacumm will not > > process tables that should be vacuumed until manually re-analyzed. > > AFAICS this is an unsurprising consequence of flushing stats on a cras

Re: [GENERAL] autovacuum and immediate shutdown issues

2009-10-19 Thread Tom Lane
Brad Nicholson writes: > If you issue an immediate shutdown to the database, autovacumm will not > process tables that should be vacuumed until manually re-analyzed. AFAICS this is an unsurprising consequence of flushing stats on a crash. If you don't like it, avoid immediate shutdowns --- they a