|From:||Anastasia Lubennikova <a(dot)lubennikova(at)postgrespro(dot)ru>|
|To:||Michael Paquier <michael(at)paquier(dot)xyz>, Euler Taveira <euler(dot)taveira(at)2ndquadrant(dot)com>|
|Cc:||Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>|
|Subject:||Re: cleanup temporary files after crash|
|Views:||Raw Message | Whole Thread | Download mbox | Resend email|
On 01.11.2020 04:25, Michael Paquier wrote:
> On Sat, Oct 31, 2020 at 09:01:15PM -0300, Euler Taveira wrote:
>> I thought about not providing a GUC at all or provide it in the developer
>> section. I've never heard someone saying that they use those temporary
>> files to investigate an issue. Regarding a crash, all information is already
>> available and temporary files don't provide extra details. This new
>> GUC is just to keep the previous behavior. I'm fine without the GUC, though.
> The original behavior is as old as 4a5f38c4, and last time we talked
> about that there were arguments about still keeping the existing
> behavior to not cleanup files during a restart-after-crash scenario
> for the sake of being useful just "in case". I have never used that
> property myself, TBH, and I have seen much more cases of users caring
> about the data folder not facing an ENOSPC particularly if they don't
> use different partitions for pg_wal/ and the main data folder.
Thank you, Euler for submitting this.
+1 for the feature. One of the platforms we support uses temp files a
lot and we faced the problem, while never actually used these orphan
files for debugging purposes.
I also think that the GUC is not needed here. This 'feature' was
internal from the very beginning, so users shouldn't care about
preserving old behavior. Without the GUC the patch is very simple,
please see attached version. I also omit the test, because I am not sure
it will be stable given that the RemovePgTempFiles() allows the
possibility of failure.
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
|Next Message||Kyotaro Horiguchi||2020-11-26 08:52:53||Re: ResourceOwner refactoring|
|Previous Message||Magnus Hagander||2020-11-26 08:13:59||Re: Online verification of checksums|