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 1sp2f3-00FuJW-Ly for pgsql-hackers@arkaria.postgresql.org; Fri, 13 Sep 2024 09:32:18 +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 1sp2f2-00GzGy-GN for pgsql-hackers@arkaria.postgresql.org; Fri, 13 Sep 2024 09:32:16 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sp2f2-00GzGg-6M for pgsql-hackers@lists.postgresql.org; Fri, 13 Sep 2024 09:32:16 +0000 Received: from meldrar.postgresql.org ([2a02:c0:301:0:ffff::31]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sp2et-000wXH-ML for pgsql-hackers@postgresql.org; Fri, 13 Sep 2024 09:32:15 +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=HACqw1jbl0QIFAIMPCrpGFP001vP+cu4xnIH3yJj9M8=; b=ACRPFjCBJJs891NIi2ndfIx6Y/ UcLQQMzEsd61zhl5N2eaauoHPnVrOzCzpt8B8Oi+IHlU7IG25IMjHRWfeZrdQBHhXsYBogUl2szYB 99HzYG9zjL9pQpAlUkctY9qwv95Rze940Upoh7B9edZHy93GIOaI1p+zsWTnZg7ZCOcT9+B9qUT5B BgAzW0cDqRaCDnP5iz6yK5b9/917eXyZ2UlOoA44b/SeMUyrj/qALHErhrXfhdMweiwAvXIG8gS0q ZOajQhdIPyb8fKOYKry25gXUno3t50R1zUTa12HzEeniVERAclXwGV+l4A5QECLgJRCKgE6wKb977 xfljg09A==; Received: from 4.140.178.217.shared.user.transix.jp ([217.178.140.4] 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 1sp2eo-002IbZ-Ou; Fri, 13 Sep 2024 09:32:05 +0000 Date: Fri, 13 Sep 2024 18:31:53 +0900 (JST) Message-Id: <20240913.183153.727679591062671857.ishii@postgresql.org> To: ashutosh.bapat.oss@gmail.com Cc: dgrowleyml@gmail.com, orlovmg@gmail.com, jian.universality@gmail.com, pgsql-hackers@postgresql.org Subject: Re: Add memory/disk usage for WindowAgg nodes in EXPLAIN From: Tatsuo Ishii In-Reply-To: References: <20240913.151133.589948606714055793.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 patch looks fine but it doesn't add a test case where Storage is > Disk We can test the case by setting work_mem to the minimum size (64kB) and giving slightly larger "stop" parameter to generate_series. > or the case when the last usage fit in memory but an earlier > usage spilled to disk. In my understanding once tuplestore changes the storage type to disk, it never returns to the memory storage type in terms of tuplestore_get_stats. i.e. once state->usedDisk is set to true, it never goes back to false. So the test case is not necessary. David, am I correct? > Do we want to cover those. This test would be > the only one where those code paths could be tested. I am fine to add the first test case. Best reagards, -- Tatsuo Ishii SRA OSS K.K. English: http://www.sraoss.co.jp/index_en/ Japanese:http://www.sraoss.co.jp