Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kXqPV-0003H6-Kw for pgsql-hackers@arkaria.postgresql.org; Wed, 28 Oct 2020 18:43:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kXqPU-0001SU-IH for pgsql-hackers@arkaria.postgresql.org; Wed, 28 Oct 2020 18:43:00 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kXqPU-0001SM-6N for pgsql-hackers@lists.postgresql.org; Wed, 28 Oct 2020 18:43:00 +0000 Received: from mail-ej1-x62a.google.com ([2a00:1450:4864:20::62a]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1kXqPR-0006c0-HW for pgsql-hackers@lists.postgresql.org; Wed, 28 Oct 2020 18:42:58 +0000 Received: by mail-ej1-x62a.google.com with SMTP id bn26so312130ejb.6 for ; Wed, 28 Oct 2020 11:42:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=mOYCRkv076YWFovLxIi6kdKWBpwtKjf45wa0gZvxZlY=; b=oLVDwunHSSHHHxEnE+74Joi+ljyLfXABb6oXfbgkBGwTIDVwOpg6pGGYDY4OBD+Jbu NrF8V9IZCXqIVAMLdBYnF1GrB5ITUa5cm/Z9+QffHK5zzc2P+K6gLV6LjSyQL8hggMq/ HwNnBWr2X1S0CiGcRmRMUqezx7BXaJYhxXCpK2R9O3gqP8p3hira9GUiik0gSexI8UYX FM6GjSjXDla9+7qojGkZ5OKlat7rbJMii1d+KL2FtB/lBvdsvbHPJHf9UtvbPneR6dp4 GBfR2UKqrRu7l1iveiuUZ01C4batKswMUqFYhR8lb5T52rMSsL3EIc2tRkhaEXyHg0s9 PcXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=mOYCRkv076YWFovLxIi6kdKWBpwtKjf45wa0gZvxZlY=; b=cQAJU0UluuHqImyG3bNlFoIqq7DucdDHD/wKhYgz/553wT1r4YPPtZt4Wgq9Yo8NCZ qv8iA/dffqs63dBdK6YPARaVCt5BA1dyG2ZEVIFs0Y5NMzgq/MzfUpvMnEMurCtI1Cn2 APBA3+G1XWdgkGAn6Q9phzcHyAy7vCEnHutckuCNSv1KYclGo+RoQUKXYQKxS680BwZ0 Qqv21WDa3pPsabWWsQvg9p6eGa94UmC6eB7yzhLp+QmqjpL7JQbsL5WQXC/Ami0HbShx mbBAv+YMqHUeM8oHKGT/0ygbf2onXsp6zbd/Na01RnAM0q//zohJDYOTDUr+g0q0Yqct ixTA== X-Gm-Message-State: AOAM533WVSSEHzjNT6mlbGu9NVg+R6arqE7Ctx/+CSaBbm9FAFmxJW0q nvaauCzBnkH3RNlLnjA03jAJVg== X-Google-Smtp-Source: ABdhPJya95nxMGk68icyPXKmhlKzY1lp+3JnUxIYwi9gC2Rq8O+BjISG/mmriFKyHp7/Xi36WeIHQg== X-Received: by 2002:a17:906:fc10:: with SMTP id ov16mr422622ejb.417.1603910575882; Wed, 28 Oct 2020 11:42:55 -0700 (PDT) Received: from localhost (ip-86-49-245-76.net.upcbroadband.cz. [86.49.245.76]) by smtp.gmail.com with ESMTPSA id u2sm255908edr.70.2020.10.28.11.42.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Oct 2020 11:42:55 -0700 (PDT) Date: Wed, 28 Oct 2020 19:42:52 +0100 From: Tomas Vondra To: Euler Taveira Cc: PostgreSQL Hackers Subject: Re: cleanup temporary files after crash Message-ID: <20201028184252.5vpoe65kcfebbmmf@development> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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