Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1j9cag-0001fH-Nj for pgsql-hackers@arkaria.postgresql.org; Wed, 04 Mar 2020 22:34:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1j9caf-0000NV-FG for pgsql-hackers@arkaria.postgresql.org; Wed, 04 Mar 2020 22:34:09 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1j9caf-0000NM-37 for pgsql-hackers@lists.postgresql.org; Wed, 04 Mar 2020 22:34:09 +0000 Received: from mail-pg1-x534.google.com ([2607:f8b0:4864:20::534]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1j9cad-0000Ls-1T for pgsql-hackers@lists.postgresql.org; Wed, 04 Mar 2020 22:34:07 +0000 Received: by mail-pg1-x534.google.com with SMTP id n24so692155pgk.11 for ; Wed, 04 Mar 2020 14:34:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=illuminatedcomputing-com.20150623.gappssmtp.com; s=20150623; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=zBKGf8FazPJKPmxeQ7actGxsdjg6zivMWvLM/qO9I3M=; b=exXgzY5DG1B5qOx8z9CY7SfI0e5B5A8WbCC3XCpBGpLwEAcEDhFJlcGwb1pdv/sSLR N1u3HAshUJ6Vfd3XQamP0lTUP1UTVKXsGyrsDAPr4VDwSgXCP45LL6B/puWTL6UfMAxm BmLCTuKCvI8ahDlb72eAU8vRL/xvMUPUgora7c0Do2O8EvXmJcF/q/Zv8EWPx7LDFBWa 4YgZBVJCoF8IzfjkylukTBRAj/rKxHuUVEU5v5btRXPRJhjwNZDy70x0etkx6EDm9+9W W9Gu0mKp9I+F7Mf0RTNsGIWk+4qbTkcDaH2YcBlDW+LDnQfZJQkhKJUQo5d8DM031s+b M6eQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=zBKGf8FazPJKPmxeQ7actGxsdjg6zivMWvLM/qO9I3M=; b=R5L312O77MZffGBn7OD4oOY7leA/6XyKfGpwNWUZPj3GSlOdyD7c4LmCxt5JSdWmk3 GWWkknHCTw0dhW8wFvnZVLlmP3X9z1y2rykA94Er30ggeqBa76hb4oR6/Gh1H14VP3sY 6Ka814DwnjALDl/lcgYyOw5txJHzsSETfmtyfHQ3Dwmd4h1qQj9IiSuLV3yVMAt2Ha5Q mPLE9B8YiEfCz/Mhvw2q0GFkMWyF4ny/gHuR9tE94CvqAhvSe+xW1Zx5UYwktR449K09 gng8LlWPIlyGB9t+eNHv79mrq3WVM18FvP1QJS+p9R/MbGJuajHFiIfaTzlxz1WfxuFA YhAw== X-Gm-Message-State: ANhLgQ2wyjd8FxeZmWqC8vAqFDIyRpuI8j0oKvRYbreIviJrgo3EKqs0 2BDiRxXGLJRxCXlPWzqqbSjzuBDd5VY= X-Google-Smtp-Source: ADFU+vurLpw3WxiQgUVxNABQ2Om7ueMoIa3X8mT85AkPInEODBOIc8Uu7b5/kWa8aAz8fVVxmPizdA== X-Received: by 2002:a63:1e4f:: with SMTP id p15mr4613891pgm.28.1583361245711; Wed, 04 Mar 2020 14:34:05 -0800 (PST) Received: from [192.168.2.101] (static-50-53-109-254.bvtn.or.frontiernet.net. [50.53.109.254]) by smtp.googlemail.com with ESMTPSA id mp5sm3669226pjb.48.2020.03.04.14.34.04 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 04 Mar 2020 14:34:05 -0800 (PST) Subject: Re: useless RangeIOData->typiofunc To: pgsql-hackers@lists.postgresql.org References: <20200304215711.GA8732@alvherre.pgsql> From: Paul Jungwirth Message-ID: <2f266b59-86ab-af94-902f-5c5a6a834de4@illuminatedcomputing.com> Date: Wed, 4 Mar 2020 14:34:02 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 In-Reply-To: <20200304215711.GA8732@alvherre.pgsql> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 3/4/20 1:57 PM, Alvaro Herrera wrote: > I noticed while going over the multirange types patch that it adds a > pointless typiofunc cached OID to a struct used for I/O functions' > fn_extra. It seems to go completely unused, so I checked range types > (which this was cribbed from) and indeed, it is completely unused there > either. My guess is that it was in turn cribbed from array's > ArrayMetaState, which is considerably more sophisticated; I suspect > nobody noticed that caching it was pointless. I didn't believe it at first but I think you're right. :-) > Here's a patch to remove it from rangetypes.c. It doesn't really waste > much memory anyway, but removing it lessens the cognitive load by one or > two bits. Looks good to me, and it seems okay to make the same edits to multirangetypes.c Yours, -- Paul ~{:-) pj@illuminatedcomputing.com