Re: Postgres and mod_perl: table locked during vacuum?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jeff Boes <jboes(at)nexcerpt(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Postgres and mod_perl: table locked during vacuum?
Date: 2002-06-18 13:29:14
Message-ID: 25605.1024406954@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Jeff Boes <jboes(at)nexcerpt(dot)com> writes:
> We are experiencing a fairly predictable lock-up in the overnight VACUUM
> ANALYZE maintenance script. The VACUUM gets to the pg_class table and
> then stops, obviously waiting for something else to give up control of
> the table. The VACUUM script resumes precisely when the web server is
> bounced. The web server is using mod_perl, and mod_perl uses DBI code
> (in a locally developed module that does establish a connection at
> *compile* time in order to verify existence of tables used in the
> code).

I suppose you're not running 7.2 ?

Turn on debug_print_query and look at the log to see what queries
are being issued. I'll bet lunch that the webserver code is doing
something like

begin;
select * from pg_class where ... ;
<<go to sleep indefinitely>>

regards, tom lane

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Michael Ansley (UK) 2002-06-18 13:32:09 Re: Uppercase field names not found
Previous Message David Stanaway 2002-06-18 12:47:37 Re: Uppercase field names not found