Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1smTk1-0064MI-SJ for pgsql-hackers@arkaria.postgresql.org; Fri, 06 Sep 2024 07:50:50 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1smTjz-009St9-2I for pgsql-hackers@arkaria.postgresql.org; Fri, 06 Sep 2024 07:50:47 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1smTjy-009SmX-Hs for pgsql-hackers@lists.postgresql.org; Fri, 06 Sep 2024 07:50:47 +0000 Received: from meldrar.postgresql.org ([2a02:c0:301:0:ffff::31]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1smTjw-000Pob-Fr for pgsql-hackers@postgresql.org; Fri, 06 Sep 2024 07:50:45 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=postgresql.org; s=20171124; h=Content-Transfer-Encoding:Content-Type: Mime-Version:References:In-Reply-To:From:Subject:Cc:To:Message-Id:Date:Sender :Reply-To:Content-ID:Content-Description; bh=JLsEt553al9XhR5E6xsGvVOSBM85MzzdmyLm/57gso0=; b=d2QKUTwfEffJxm96PNqwvUgGME 3XZIG6qPpJbJK3an5wb5Kq/L78pR5STKvt7902naelSuaLMaINs1IHngP8WG8ZniwQqyHrY069hW+ GIiXmeO8ts2cGSgMw1I22UcuJtqr+J8+3pB7VTahTWKR1OToD42xT6GjZROLDMQWbXMdnV+/Ovu1v hNKn8lNbX4BPyQUIPYuyZBZ+y6VCvLeLuNE0VMWs2sfxcdeNRbPKaT3mXRzpecQVxEhGgbz2VkXOp BwwMuIkfeBxN1liPvc+usQWTlPJujLvxOuX48Wr7khOZotPsQbpupFy0Ue4hWJpZp68bnBDi1hCys NTzg64fA==; Received: from 185.184.178.217.shared.user.transix.jp ([217.178.184.185] helo=localhost) by meldrar.postgresql.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 (Exim 4.94.2) (envelope-from ) id 1smTjq-000vpT-RP; Fri, 06 Sep 2024 07:50:42 +0000 Date: Fri, 06 Sep 2024 16:50:30 +0900 (JST) Message-Id: <20240906.165030.496293122169166261.ishii@postgresql.org> To: ashutosh.bapat.oss@gmail.com Cc: dgrowleyml@gmail.com, pgsql-hackers@postgresql.org Subject: Re: Add memory/disk usage for WindowAgg nodes in EXPLAIN From: Tatsuo Ishii In-Reply-To: References: <20240906.150237.57111972562260411.ishii@postgresql.org> X-Mailer: Mew version 6.8 on Emacs 26.3 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > The changes look better. A nitpick though. With their definitions > changed, I think it's better to change the names of the functions > since their purpose has changed. Right now they report the storage > type and size used, respectively, at the time of calling the function. > With this patch, they report maximum space ever used and the storage > corresponding to the maximum space. tuplestore_space_used() may be > changed to tuplestore_maxspace_used(). I am having difficulty with > tuplestore_storage_type_name(); tuplestore_largest_storage_type_name() > seems mouthful and yet not doing justice to the functionality. It > might be better to just have one funciton tuplestore_maxspace_used() > which returns both the maximum space used as well as the storage type > when maximum space was used. +1. Returning the storage type by the same function, not by a separate function looks more natural. Best reagards, -- Tatsuo Ishii SRA OSS K.K. English: http://www.sraoss.co.jp/index_en/ Japanese:http://www.sraoss.co.jp