dbTalk Databases Forums  

Vacuum hangs

comp.databases.postgresql.general comp.databases.postgresql.general


Discuss Vacuum hangs in the comp.databases.postgresql.general forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Patrick Hatcher
 
Posts: n/a

Default Vacuum hangs - 11-09-2004 , 01:09 PM






PG: 7.4.5
RH 7.3
Vac_Mem=12mg

Doing a Vacuum Analyze on a table and it's been hanging for at least 2
hours. I could see no other users hitting the table at the time. This is
the second time this has happened on this particular table and I can't
seem to pin point the issue. If I kill the PID and restart the vacuum
analyze it works fine. Any suggestion where I start searching? Here is
an output from pg_stat_activity and the

mdc_oz=# select * from pg_stat_activity:
datid | 17145
datname | mdc_oz
procpid | 16560
usesysid | 2
usename | phatcher
current_query | VACUUM ANALYZE cdm.cdm_reg_customer;
query_start | 2004-11-09 10:02:32.523146-08


mdc_oz=# select * from pg_locks where pid=16560;
-[ RECORD 1 ]-------------------------
relation | 7059380
database | 17145
transaction |
pid | 16560
mode | ShareUpdateExclusiveLock
granted | t
-[ RECORD 2 ]-------------------------
relation |
database |
transaction | 28863986
pid | 16560
mode | ExclusiveLock
granted | t
-[ RECORD 3 ]-------------------------
relation | 7059380
database | 17145
transaction |
pid | 16560
mode | ShareUpdateExclusiveLock
granted | t

TIA

Patrick Hatcher

Reply With Quote
  #2  
Old   
Patrick Hatcher
 
Posts: n/a

Default Re: Vacuum hangs - 11-09-2004 , 02:03 PM










Will do thanks. I ended up dropping and recreating the index and that
seems to have fixed the problem.


Patrick Hatcher




Tom Lane
<tgl (AT) sss (DOT) pgh.pa.u
s> To
Patrick Hatcher
11/09/2004 12:06 <PHatcher (AT) macys (DOT) com>
PM cc
pgsql-general (AT) postgresql (DOT) org
Subject
Re: [GENERAL] Vacuum hangs










Patrick Hatcher <PHatcher (AT) macys (DOT) com> writes:
Quote:
Doing a Vacuum Analyze on a table and it's been hanging for at least 2
hours. I could see no other users hitting the table at the time. This
is
the second time this has happened on this particular table and I can't
seem to pin point the issue. If I kill the PID and restart the vacuum
analyze it works fine. Any suggestion where I start searching?
Next time, please attach to the vacuuming backend with gdb and get a
stack trace. The pg_locks output doesn't tell us anything except that
the problem isn't a lock :-(

regards, tom lane



---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html



Reply With Quote
  #3  
Old   
Tom Lane
 
Posts: n/a

Default Re: Vacuum hangs - 11-09-2004 , 02:06 PM



Patrick Hatcher <PHatcher (AT) macys (DOT) com> writes:
Quote:
Doing a Vacuum Analyze on a table and it's been hanging for at least 2
hours. I could see no other users hitting the table at the time. This is
the second time this has happened on this particular table and I can't
seem to pin point the issue. If I kill the PID and restart the vacuum
analyze it works fine. Any suggestion where I start searching?
Next time, please attach to the vacuuming backend with gdb and get a
stack trace. The pg_locks output doesn't tell us anything except that
the problem isn't a lock :-(

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.