From: Tomas Vondra <tomas.vondra@2ndquadrant.com>
To: Euler Taveira <euler.taveira@2ndquadrant.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: cleanup temporary files after crash
Date: Wed, 28 Oct 2020 19:42:52 +0100
Message-ID: <20201028184252.5vpoe65kcfebbmmf@development> (raw)
In-Reply-To: <CAH503wDKdYzyq7U-QJqGn=Gm6XmoK+6_6xTJ-Yn5WSvoHLY1Ww@mail.gmail.com>
References: <CAH503wDKdYzyq7U-QJqGn=Gm6XmoK+6_6xTJ-Yn5WSvoHLY1Ww@mail.gmail.com>
Hi Euler,
On Wed, Oct 28, 2020 at 11:16:26AM -0300, Euler Taveira wrote:
>Hi,
>
>Bug #16427 mentioned that temporary files are not removed after a crash. I
>heard similar complaints from some customers. In the bug report [1], I
>proposed a new GUC to control whether temporary files are removed after a
>crash recovery. The current behavior is only useful for debugging purposes.
>It also has an undesirable behavior: you have to restart the service to
>reclaim the space. Interrupting the service continuity isn't always an
>option and due to limited resources, you have no choice but to restart the
>service.
>
>The new GUC cleanup_temp_files_after_crash is marked as SIGHUP. Hence, you
>can enable it to debug without service interruption. The default value is
>on which means it changes the current behavior. Documentation and tests are
>included.
>
I did a quick review and the patch seems fine to me. Let's wait for a
bit and see if there are any objections - if not, I'll get it committed
in the next CF.
One thing I'm not sure about is whether we should have the GUC as
proposed, or have a negative "keep_temp_files_after_restart" defaulting
to false. But I don't have a very good justification for the alternative
other than vague personal preference.
regards
--
Tomas Vondra http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
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 using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: tomas.vondra@2ndquadrant.com, euler.taveira@2ndquadrant.com, pgsql-hackers@lists.postgresql.org
Subject: Re: cleanup temporary files after crash
In-Reply-To: <20201028184252.5vpoe65kcfebbmmf@development>
* 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