Обсуждение: Re: Possible bugreport 8.3 beta1 on Win32: Looking like a deadlock with AutoVacuum
Re: Possible bugreport 8.3 beta1 on Win32: Looking like a deadlock with AutoVacuum
От
Deblauwe Gino
Дата:
Alvaro Herrera schreef: <blockquote cite="mid:20071009165247.GA22628@alvh.no-ip.org" type="cite"><pre wrap="">Deblauwe Ginowrote: </pre><blockquote type="cite"><pre wrap="">OS: Windows XP Pro SP2 CPU: AMD Athlon 64 3500+ RAM: 2GB DB: PostgreSQL 8.3beta1, compiled by Visual C++ build 1400 I've come to the conclusion that it seems like a deadlock occurs when dropping a column in a table the same moment that table is autovacuumed. Example: ALTER TABLE bondetail DROP COLUMN btw; (user=gino, 16252 records) deadlocks with VACUUM ANALYZE public.bondetail; (user=postgres) </pre></blockquote><pre wrap=""> Does it really deadlock, or is it just locked waiting for the vacuum to finish? If it deadlocks you should get a message about it and a transaction rollback. Otherwise you should be able to see the ungranted lock in pg_locks. Also it's not clear if autovacuum is involved, or you invoked the VACUUM ANALYZE manually. Can you clarify? </pre></blockquote> No it just looks like a deadlock on first sight. It just takes a very long time. <br /> In this case,it takes 10 minutes instead of 5 seconds to execute the query.<br /><br /> I was only able to reproduce this on 'ALTERTABLE x DROP COLUMN y;' queries. Those things happen while upgrading<br /> our software to a newer version. The morecommon instructions (SELECT/INSERT/UPDATE/DELETE) work fine the same<br /> as adding/changing columns/tables.<br /><br/> Greetings<br /> Deblauwe Gino<br />