Unix Technical Forum

Re: database vacuum from cron hanging

This is a discussion on Re: database vacuum from cron hanging within the pgsql Hackers forums, part of the PostgreSQL category; --> (gdb) p BufferDescriptors[781] $1 = {tag = {rnode = {spcNode = 1663, dbNode = 16385, relNode = 2666}, blockNum ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Hackers

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-11-2008, 07:11 AM
Kevin Grittner
 
Posts: n/a
Default Re: database vacuum from cron hanging

(gdb) p BufferDescriptors[781]
$1 = {tag = {rnode = {spcNode = 1663, dbNode = 16385, relNode = 2666}, blockNum = 1}, flags = 70, usage_count = 5, refcount = 4294967294,
wait_backend_pid = 748, buf_hdr_lock = 0 '\0', buf_id = 781, freeNext = -2, io_in_progress_lock = 1615, content_lock = 1616}


>>> Tom Lane <tgl@sss.pgh.pa.us> 10/11/05 4:51 PM >>>

Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
> Trivial observation: process 748 is a manually-issued VACUUM (manually,
> by cron), it's holding locks other VACUUMs are waiting for, and is
> waiting on LockBufferForCleanup. I guess this means it lost a signal,
> or somebody else is holding a pin on the buffer. If this is the case,
> who is it and why isn't it releasing the pin?


Yeah, this is clearly the problem --- the other guys waiting are just
queued up behind this one.

If the system is still in that state, could you reattach to the stuck
process and do
p BufferDescriptors[781]
It might be good to do
p BufferDescriptors[782]
as well --- I am not sure offhand whether LockBufferForCleanup takes
a 0-based or 1-based index, and in any case it's possible gcc would
have done something weird with the variable contents. You should
see wait_backend_pid = 748 in the one we want.

regards, tom lane


---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
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
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 05:20 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com