Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eFkuA-0004ml-Gd for pgsql-committers@arkaria.postgresql.org; Fri, 17 Nov 2017 17:58:18 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eFkuA-0004Mp-1n for pgsql-committers@arkaria.postgresql.org; Fri, 17 Nov 2017 17:58:18 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eFku9-0004Mf-K8 for pgsql-committers@lists.postgresql.org; Fri, 17 Nov 2017 17:58:17 +0000 Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eFku6-0001T0-Ag for pgsql-committers@postgresql.org; Fri, 17 Nov 2017 17:58:16 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id D205520DC1; Fri, 17 Nov 2017 12:58:12 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute5.internal (MEProxy); Fri, 17 Nov 2017 12:58:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; bh=nNhUdquN24p2iq0Ounj11s52YaTzG qhluCL2MWceiSY=; b=acqmqOmcfj69nvREq2l6rOlr5oyb7tJNRKEcmtPhRVXwr dXCu6+f/Tyn5aupUmE9uj1OaENFQwhp49AWbv32vLdpsnpIrFzTy5RAeILZSqBaV utkfXaehgS/3w0BqBb9AFYfq0yyVeWmpLL1bAb9Km2UsQHKRv0xJ1rsC17JBbMTv LAJut3nssziQQOspMMtYOdgN032l1j04NbTYrqkILQI+8uqZwxpHKrgVlhtsHicl YoVYkjSjxkKZf9vVgMhthNcBpgn5BpIUrThH/wDQw0JCStZxPbfONwSMwM9pR9CZ MOHyQ1ddt22joyqRIYqKXADYFF/9fvmG6X6Q4zdOQ== X-ME-Sender: Received: from intern.anarazel.de (unknown [136.24.76.189]) by mail.messagingengine.com (Postfix) with ESMTPA id 8D7B17FA78; Fri, 17 Nov 2017 12:58:12 -0500 (EST) Date: Fri, 17 Nov 2017 09:58:11 -0800 From: Andres Freund To: Tom Lane Cc: pgsql-committers@postgresql.org, Thomas Munro Subject: Re: pgsql: Remove BufFile's isTemp flag. Message-ID: <20171117175811.qgrs75pgyhl42kgr@alap3.anarazel.de> References: <23339.1510887494@sss.pgh.pa.us> <20171117031149.hslkxis732hkjuog@alap3.anarazel.de> <24110.1510888651@sss.pgh.pa.us> <32216.1510935834@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <32216.1510935834@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi, On 2017-11-17 11:23:54 -0500, Tom Lane wrote: > OK, after looking through the history, the reason for isTemp = false > is indeed to allow BufFileCreate() to maintain its old semantics, > wherein you could attach a BufFile to an already-existing, possibly > non-temp file. There have not been any core callers of BufFileCreate() > in a long time (maybe not since that commit, in fact), but I imagine > I left it alone for fear that extensions might be using it. I see though > that Bruce ifdef'd it out in 20ad43b5, so there aren't any extensions > using it either. > > We should flat-out remove the function, since this change makes it > impossible to resurrect with its old semantics. That sounds reasonable. > I wonder whether we should then rename BufFileCreateTemp to just > BufFileCreate, since it's no longer possible to have a BufFile that > isn't temp. I suspect that some attention to the comments might be > needed too. Thomas? > Or maybe we should revert 11e264517. It doesn't seem to be buying > much to make up for the loss of flexibility. There's a bunch of work adding new functionality to buffile.c pending. And having code paths that have been dead for 10+ years around and maintaining them in working order doesn't seem like a good use of time. Greetings, Andres Freund