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 1lMvhH-0002NI-WC for pgsql-hackers@arkaria.postgresql.org; Thu, 18 Mar 2021 16:40:32 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lMvhG-0002zV-U8 for pgsql-hackers@arkaria.postgresql.org; Thu, 18 Mar 2021 16:40:30 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lMvhG-0002zN-JH for pgsql-hackers@lists.postgresql.org; Thu, 18 Mar 2021 16:40:30 +0000 Received: from mail-ej1-x635.google.com ([2a00:1450:4864:20::635]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lMvhD-0001LI-7a for pgsql-hackers@lists.postgresql.org; Thu, 18 Mar 2021 16:40:30 +0000 Received: by mail-ej1-x635.google.com with SMTP id ce10so4969947ejb.6 for ; Thu, 18 Mar 2021 09:40:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb-com.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=5ewxtZhNhpXg3tug7x2riJ0dLW344yL1vXsEAfxaowQ=; b=hJ9QeyqYQevLYU4701CTuGy436T1nEPwuQBoG7mTpd7eo4MI0sOEsCBfaJmiWzgL4G Ryq2zljfGBibW6Yw9Zd3Jny2cQrqp0Ac4Z7hYogKuGSTMx6x1bIQUyD4hvGLQShwqV9z lGlULnkC2T80GX95wwG/9Z5RdgZl7PlSFhOXYzfgfGqR8c/3UshA1shfnMbuarF5NQGk UhtswO2BBT35lvACgCt3/JxpTHJghGuPQfvJH8HXftzuzES+PsXKymY0oBfwq8BKe3oj JLvI+W54ZRXLLHdxIBPxFTBKQ6Jzvt0GqWnc+zEvGqFQiM5e+x7RdaKK9qduwZIQORHC rnyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=5ewxtZhNhpXg3tug7x2riJ0dLW344yL1vXsEAfxaowQ=; b=ac2Uhro4omK8F7Asl5g0nhtj5L/MZSnKROnsWCUEQ72wLQH8wwySBSOKbNIdZjpXFe qqNWkIitrzmdY6a+wRzdJXWfYsX+6hnp1GByoom8dm29snl0luJfWnOqeFsif4nD5azx uiNm6PHeMzxbXZ2NLI5kVdjFDjZaZt/BqY5tv8nspELTIHJcTVwY3DQtwShq0mSixW0U HMx94pkzTRs1oyOGxH3XeXFs3TVeDTdxUciOEjVhGlTYbNeqEVBgl0x/01sXiRVV0h7K cNCs/tDl6PJ1MY7s62j8DcFwohH31a59KBLrQXRquonxAD7i7riii+MS3AHUnTuQ7h1R 6UDQ== X-Gm-Message-State: AOAM530jRSX9r2KbQiC+e2V+5QVDgbdZ6WFlxXs+H7cOQCNjX5gcv9Ta GWviPJeuJzBoa5TvpJi7kt/sUwqu8p1TOq0TAKLhTWGzunCZ7Y2sPYt2aIgGpwXbxYGh8v3nifE yB7NS5ij7a/o/wTblplM2ZixRLsSbG3po4L+GHUQ4Kj79LYr7bvbfmzUp5guAxEnxrgCJJRPddt 6Z0b+U21Ta84Zu756K88IQh7nbaVd4NytC5zF/9RnLN2D5MzrjqiW7 X-Google-Smtp-Source: ABdhPJwoZKcg675bgmAUAcOG/KUc4hVhy66N6Dv/wD0M2qcAbqh0C0jk9yPePjNtLl8VWdlnL+tJoA== X-Received: by 2002:a17:906:ca50:: with SMTP id jx16mr42086747ejb.72.1616085625780; Thu, 18 Mar 2021 09:40:25 -0700 (PDT) Received: from [10.137.0.20] (ip-86-49-253-127.net.upcbroadband.cz. [86.49.253.127]) by smtp.gmail.com with ESMTPSA id d1sm2226344eje.26.2021.03.18.09.40.24 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 18 Mar 2021 09:40:25 -0700 (PDT) Subject: Re: cleanup temporary files after crash To: Euler Taveira , Thomas Munro , Michael Paquier Cc: Euler Taveira , Anastasia Lubennikova , Tomas Vondra , PostgreSQL Hackers , Tom Lane References: <20201028184252.5vpoe65kcfebbmmf@development> <20201101012555.GC3000@paquier.xyz> <1982ee3c-54c3-280a-806a-fd28ad8f19e6@postgrespro.ru> <363cb85c-3a03-9a49-b830-8b645c1241d9@enterprisedb.com> <4245d284-97b2-4056-96c2-455792d9b564@www.fastmail.com> From: Tomas Vondra Message-ID: <8740f056-a7c0-ff12-0a50-de5324a928ee@enterprisedb.com> Date: Thu, 18 Mar 2021 17:40:22 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 MIME-Version: 1.0 In-Reply-To: <4245d284-97b2-4056-96c2-455792d9b564@www.fastmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-CLOUD-SEC-AV-Info: enterprisedb,google_mail,monitor X-CLOUD-SEC-AV-Sent: true X-Gm-Spam: 0 X-Gm-Phishy: 0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 3/17/21 2:34 AM, Euler Taveira wrote: > On Sun, Mar 14, 2021, at 11:01 PM, Thomas Munro wrote: >> On Wed, Mar 10, 2021 at 1:31 AM Michael Paquier > > wrote: >> > On Tue, Mar 09, 2021 at 02:28:43AM +0100, Tomas Vondra wrote: >> > > Let's move this patch forward. Based on the responses, I agree the >> > > default behavior should be to remove the temp files, and I think we >> > > should have the GUC (on the off chance that someone wants to preserve >> > > the temporary files for debugging or whatever other reason). >> > >> > Thanks for taking care of this.  I am having some second-thoughts >> > about changing this behavior by default, still that's much more useful >> > this way. >> >> +1 for having it on by default. >> >> I was also just looking at this patch and came here to say LGTM except >> for two cosmetic things, below. > Thanks for taking a look at this patch. I'm not sure Tomas is preparing > a new > patch that includes the suggested modifications but I decided to do it. This > new version has the new GUC name (using "remove"). I also replaced "cleanup" > with "remove" in the all the remain places. As pointed by Thomas, I reworded > the paragraph that describes the GUC moving the default information to the > beginning of the sentence. I also added the "literal" as suggested by > Michael. > The postgresql.conf.sample was fixed. The tests was slightly modified. I > reworded some comments and added a hack to avoid breaking the temporary file > test in slow machines. A usleep() after sending the query provides some time > for the query to create the temporary file. I used an arbitrarily sleep > (10ms) > that seems to be sufficient. > Thanks. Pushed with some minor changes to docs wording. regards -- Tomas Vondra EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company