pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedPostgres and mod_perl: table locked during vacuum?
2+ messages / 2 participants
[nested] [flat]
* Postgres and mod_perl: table locked during vacuum?
@ 2002-06-17 14:02 Jeff Boes <jboes@nexcerpt.com>
0 siblings, 1 reply; 2+ messages in thread
From: Jeff Boes @ 2002-06-17 14:02 UTC (permalink / raw)
To: pgsql-admin
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). What puzzles me is that the start-up code does not do any
UPDATEs or DELETEs, so although some of the connections do not have
AutoCommit enabled, I don't understand why pg_class would seem to be
locked in a transaction.
--
Jeff Boes vox 616.226.9550 ext 24
Database Engineer fax 616.349.9076
Nexcerpt, Inc. http://www.nexcerpt.com
...Nexcerpt... Extend your Expertise
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Postgres and mod_perl: table locked during vacuum?
@ 2002-06-18 13:29 Tom Lane <tgl@sss.pgh.pa.us>
parent: Jeff Boes <jboes@nexcerpt.com>
0 siblings, 0 replies; 2+ messages in thread
From: Tom Lane @ 2002-06-18 13:29 UTC (permalink / raw)
To: Jeff Boes <jboes@nexcerpt.com>; +Cc: pgsql-admin
Jeff Boes <jboes@nexcerpt.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
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2002-06-18 13:29 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-06-17 14:02 Postgres and mod_perl: table locked during vacuum? Jeff Boes <jboes@nexcerpt.com>
2002-06-18 13:29 ` Tom Lane <tgl@sss.pgh.pa.us>
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