Re: [bug fix] Suppress "autovacuum: found orphan temp table" message

From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: MauMau <maumau307(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [bug fix] Suppress "autovacuum: found orphan temp table" message
Date: 2014-07-22 10:23:59
Message-ID: 20140722102359.GI4629@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2014-07-22 19:13:56 +0900, MauMau wrote:
> From: "Andres Freund" <andres(at)2ndquadrant(dot)com>
> >On 2014-07-22 17:05:22 +0900, MauMau wrote:
> >>RemovePgTempFiles() frees the disk space by removing temp relation files
> >>at
> >>server start.
> >
> >But it's not called during a crash restart.
>
> Yes, the comment of the function says:
>
> * NOTE: we could, but don't, call this during a post-backend-crash restart
> * cycle. The argument for not doing it is that someone might want to
> examine
> * the temp files for debugging purposes. This does however mean that
> * OpenTemporaryFile had better allow for collision with an existing temp
> * file name.
>
> But this is true if restart_after_crash = on in postgresql.conf, because the
> crash restart only occurs in that case. However, in HA cluster, whether it
> is shared-disk or replication, restart_after_crash is set to off, isn't it?

In almost all setups I've seen it's set to on, even in HA scenarios.

> Moreover, as the comment says, the behavior of keeping leftover temp files
> is for debugging by developers. It's not helpful for users, isn't it? I
> thought messages of DEBUG level is more appropriate, because the behavior is
> for debugging purposes.

GRR. That doesn't change the fact that there'll be files left over after
a crash restart.

> Yes, so nobody can convince serious customers that the current behavior
> makes real sense.

I think you're making lots of noise over a trivial log message.

> Could you please reconsider this?

No. Just removing a warning isn't the way to solve this. If you want to
improve things you'll actually need to improve things not just stick
your head into the sand.

Greetings,

Andres Freund

--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2014-07-22 11:28:03 Re: Production block comparison facility
Previous Message MauMau 2014-07-22 10:13:56 Re: [bug fix] Suppress "autovacuum: found orphan temp table" message