pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Can I safely kill a VACUUM ANALYZE with pg_cancel_backend 8.3
4+ messages / 4 participants
[nested] [flat]

* Can I safely kill a VACUUM ANALYZE with pg_cancel_backend 8.3
@ 2010-04-29 17:55 Jason Culverhouse <jason@mischievous.org>
  0 siblings, 0 replies; 4+ messages in thread

From: Jason Culverhouse @ 2010-04-29 17:55 UTC (permalink / raw)
  To: pgsql-admin

HI, 
I have a vacuum process that has been running on a table for the past 20 days.
The server is postgres 8.3 on ubuntu linux.

Can I safely kill the vacuum with:
	select pg_cancel_backend(26433)

Some stats
The table sees ~5million and not more than ~10million updates month

$ ps aux | grep 26433
postgres 26433  0.0  1.5 35468848 2012212 ?    Ss   Apr08  26:00 postgres: autovacuum worker process   foo

foo=# select procpid, now() - query_start, query_start, current_query from pg_stat_activity where current_query != '<IDLE>'order by 1 desc;
 procpid |        ?column?         |          query_start          |                                                             current_query                                                             
---------+-------------------------+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------
   26433 | 20 days 20:11:32.386244 | 2010-04-08 14:19:59.298784-07 | autovacuum: VACUUM ANALYZE public.message
                                                          
Thanks,
Jason
                      




^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Can I safely kill a VACUUM ANALYZE with pg_cancel_backend 8.3
@ 2010-04-30 17:57 Jason Culverhouse <Jason@Mischievous.org>
  2010-04-30 18:12 ` Re: Can I safely kill a VACUUM ANALYZE with pg_cancel_backend 8.3 Tom Lane <tgl@sss.pgh.pa.us>
  2010-04-30 18:21 ` Re: Can I safely kill a VACUUM ANALYZE with pg_cancel_backend 8.3 Kevin Grittner <Kevin.Grittner@wicourts.gov>
  0 siblings, 2 replies; 4+ messages in thread

From: Jason Culverhouse @ 2010-04-30 17:57 UTC (permalink / raw)
  To: pgsql-admin

HI, 
I have a vacuum process that has been running on a table for the past 20 days.
The server is postgres 8.3 on ubuntu linux.

Can I safely kill the vacuum with:
	select pg_cancel_backend(26433)

Some stats
The table sees ~5million and not more than ~10million updates month

$ ps aux | grep 26433
postgres 26433  0.0  1.5 35468848 2012212 ?    Ss   Apr08  26:00 postgres: autovacuum worker process   foo

foo=# select procpid, now() - query_start, query_start, current_query from pg_stat_activity where current_query != '<IDLE>'order by 1 desc;
procpid |        ?column?         |          query_start          |                                                             current_query                                                             
---------+-------------------------+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------
  26433 | 20 days 20:11:32.386244 | 2010-04-08 14:19:59.298784-07 | autovacuum: VACUUM ANALYZE public.message

Thanks,
Jason





^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Can I safely kill a VACUUM ANALYZE with pg_cancel_backend 8.3
  2010-04-30 17:57 Can I safely kill a VACUUM ANALYZE with pg_cancel_backend 8.3 Jason Culverhouse <Jason@Mischievous.org>
@ 2010-04-30 18:12 ` Tom Lane <tgl@sss.pgh.pa.us>
  1 sibling, 0 replies; 4+ messages in thread

From: Tom Lane @ 2010-04-30 18:12 UTC (permalink / raw)
  To: Jason Culverhouse <Jason@Mischievous.org>; +Cc: pgsql-admin

Jason Culverhouse <Jason@Mischievous.org> writes:
> I have a vacuum process that has been running on a table for the past 20 days.
> The server is postgres 8.3 on ubuntu linux.

> Can I safely kill the vacuum with:
> 	select pg_cancel_backend(26433)

Sure.

20 days is a long time.  Is it actually running, or blocked on a lock?
If not blocked, I have to guess that you've chosen very poor vacuum
delay settings.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Can I safely kill a VACUUM ANALYZE with pg_cancel_backend 8.3
  2010-04-30 17:57 Can I safely kill a VACUUM ANALYZE with pg_cancel_backend 8.3 Jason Culverhouse <Jason@Mischievous.org>
@ 2010-04-30 18:21 ` Kevin Grittner <Kevin.Grittner@wicourts.gov>
  1 sibling, 0 replies; 4+ messages in thread

From: Kevin Grittner @ 2010-04-30 18:21 UTC (permalink / raw)
  To: Jason Culverhouse <Jason@Mischievous.org>; pgsql-admin

Jason Culverhouse <Jason@Mischievous.org> wrote:
 
> The server is postgres 8.3 on ubuntu linux.
 
There have been a number of bugs fixed in vacuuming, including
autovacuum, since the original 8.3 release.  I hope you mean
8.3.somethingrecent -- if not, you should get the latest fixes.
 
> Can I safely kill the vacuum with:
>   select pg_cancel_backend(26433)
 
That is safe.  If it doesn't work, you may need a bigger hammer.
 
-Kevin



^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2010-04-30 18:21 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2010-04-29 17:55 Can I safely kill a VACUUM ANALYZE with pg_cancel_backend 8.3 Jason Culverhouse <jason@mischievous.org>
2010-04-30 17:57 Can I safely kill a VACUUM ANALYZE with pg_cancel_backend 8.3 Jason Culverhouse <Jason@Mischievous.org>
2010-04-30 18:12 ` Tom Lane <tgl@sss.pgh.pa.us>
2010-04-30 18:21 ` Kevin Grittner <Kevin.Grittner@wicourts.gov>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox