cleanup temporary files after crash

From: Euler Taveira <euler(dot)taveira(at)2ndquadrant(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: cleanup temporary files after crash
Date: 2020-10-28 14:16:26
Message-ID: CAH503wDKdYzyq7U-QJqGn=Gm6XmoK+6_6xTJ-Yn5WSvoHLY1Ww@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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.

[1]
https://www.postgresql.org/message-id/CAH503wB28N1382YReXWjqpqZE6iqaxERoZUqnf02eNOYs0cZOA%40mail.gmail.com

Regards,

--
Euler Taveira http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Attachment Content-Type Size
0001-Control-temporary-files-removal-after-crash.patch text/x-patch 11.7 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David G. Johnston 2020-10-28 14:21:09 Re: A new function to wait for the backend exit after termination
Previous Message Amit Langote 2020-10-28 14:01:16 Re: posgres 12 bug (partitioned table)