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 1kSmEs-0004A1-GU for pgsql-bugs@arkaria.postgresql.org; Wed, 14 Oct 2020 19:15:06 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kSmEq-00026R-NQ for pgsql-bugs@arkaria.postgresql.org; Wed, 14 Oct 2020 19:15:04 +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 1kSmEq-00026K-H6 for pgsql-bugs@lists.postgresql.org; Wed, 14 Oct 2020 19:15:04 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kSmEo-0000U6-GQ for pgsql-bugs@lists.postgresql.org; Wed, 14 Oct 2020 19:15:03 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 09EJEwJN3624718; Wed, 14 Oct 2020 15:14:58 -0400 From: Tom Lane To: Thomas Munro cc: Andres Freund , Kyotaro Horiguchi , denis.patron@previnet.it, PostgreSQL mailing lists Subject: Re: BUG #16663: DROP INDEX did not free up disk space: idle connection hold file marked as deleted In-reply-to: References: <16663-fe97ccf9932fc800@postgresql.org> <20201014.120510.184391841712786310.horikyota.ntt@gmail.com> <20201014043540.6etouknbpqqiqj7t@alap3.anarazel.de> Comments: In-reply-to Thomas Munro message dated "Thu, 15 Oct 2020 08:08:06 +1300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3624716.1602702898.1@sss.pgh.pa.us> Date: Wed, 14 Oct 2020 15:14:58 -0400 Message-ID: <3624717.1602702898@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Thomas Munro writes: > On Wed, Oct 14, 2020 at 5:35 PM Andres Freund wrote: >> I think we should consider either occasionally sending a sinval catchup >> interrupt to backends that have been idle for a while, or to use a timer >> that we use to limit the maximum time until we process sinvals. Just >> having to wait till all backends become busy and process sinval events >> doesn't really seem like good approach to me. > Oops, I also replied to this but now I see that I accidentally replied > only to Horiguchi-san and not the list! I was thinking that we should > perhaps consider truncating the files to give back the disk space (as > we do for the first segment), so that it doesn't matter so much how > long other backends take to process SHAREDINVALSMGR_ID, close their > descriptors and release the inode. +1, I was also thinking that. It'd be pretty easy to fit into the existing system structure (I think, without having looked at the relevant code lately), and it would not add any overhead to normal processing. Installing a timeout to handle this per Andres' idea inevitably *would* add overhead. regards, tom lane