pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruce Momjian <pgman@candle.pha.pa.us>
To: Jeff Boes <jboes@nexcerpt.com>
Cc: PostgreSQL-development <pgsql-hackers@postgreSQL.org>
Cc: matthew@zeut.net
Subject: pg_autovacuum crashes when query fails for temp tables
Date: Tue, 20 Apr 2004 11:25:51 -0400 (EDT)
Message-ID: <200404201525.i3KFPp809934@candle.pha.pa.us> (raw)
In-Reply-To: <4032329C.5010703@nexcerpt.com>


I looked into this and I see a number of cases where pg_autovacuum calls
send_query(), but doesn't test for a NULL return from the function.

Matthew, would you look into this and submit a patch?  Thanks.

---------------------------------------------------------------------------

Jeff Boes wrote:
> Recently I installed and started pg_autovacuum against my new Pg 7.4.1 
> installation. We use a fairly large number of temporary tables within an 
> application (that is, several copies of this application may be running, 
> and each creates and drops several temp tables as they cycle through 
> their workload). Here's what I think happened, based on the log 
> (pg_autovacuum's and the postmaster's):
> 
> pg_autovacuum.log:
> [2004-02-15 08:10:01 AM] Performing: ANALYZE "pg_temp_13"."tmp_targs"
> [2004-02-15 08:10:01 AM] Can not refresh statistics information from the 
> database nexcerpt.
> [2004-02-15 08:10:01 AM] The error is [ERROR:  relation 
> "pg_temp_13.tmp_targs" does not exist
> 
> postmaster.log:
> 2004-02-15 08:10:01 [31563] ERROR:  relation "pg_temp_13.tmp_targs" does 
> not exist
> 2004-02-15 08:10:01 [31563] LOG:  unexpected EOF on client connection
> 
> 
> It appears that pg_autovacuum collected the name of a temp table, and 
> later tried to analyze it. The table was gone by then, and this caused 
> the daemon to exit. As this happened on a Sunday morning, my weekend 
> experiment to see how pg_autovacuum would maintain our test database was 
> rather spoiled ... 8-(
> 
> -- 
> Jeff Boes                                      vox 269.226.9550 ext 24
> Database Engineer                                     fax 269.349.9076
> Nexcerpt, Inc.                                 http://www.nexcerpt.com
>            ...Nexcerpt... Extend your Expertise
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 8: explain analyze is your friend
> 

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073



view thread (16+ messages)  latest in thread

Message-ID: <200404201525.i3KFPp809934@candle.pha.pa.us>
Permalink:  ../200404201525.i3KFPp809934@candle.pha.pa.us/
Also on:    postgresql.org/message-id/200404201525.i3KFPp809934@candle.pha.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: pgman@candle.pha.pa.us, jboes@nexcerpt.com, pgsql-hackers@postgreSQL.org, matthew@zeut.net
  Subject: Re: pg_autovacuum crashes when query fails for temp tables
  In-Reply-To: <200404201525.i3KFPp809934@candle.pha.pa.us>
  References: <4032329C.5010703@nexcerpt.com> <200404201525.i3KFPp809934@candle.pha.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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