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.89) (envelope-from ) id 1iGSnA-0002aw-VS for pgsql-hackers@arkaria.postgresql.org; Fri, 04 Oct 2019 18:59:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iGSn9-0003ji-Fo for pgsql-hackers@arkaria.postgresql.org; Fri, 04 Oct 2019 18:59:03 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iGSn9-0003jV-74 for pgsql-hackers@lists.postgresql.org; Fri, 04 Oct 2019 18:59:03 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iGSn7-0002Gv-2h for pgsql-hackers@postgresql.org; Fri, 04 Oct 2019 18:59:02 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id x94IwnuS010471; Fri, 4 Oct 2019 14:58:49 -0400 From: Tom Lane To: Peter Geoghegan cc: Jeff Davis , Tomas Vondra , Melanie Plageman , Soumyadeep Chakraborty , Robert Haas , Pg Hackers , soumyadeep2007@gmail.com Subject: Re: Memory Accounting In-reply-to: References: <67f66d2fa39e35aef90093c74531a38dcd5c0f73.camel@j-davis.com> <20190926192244.mk5ru6nkofo7am3h@development> <57780817877d4b40106b248b63261e21a7a56261.camel@j-davis.com> <20190928221249.mo2jrtlakingnc5e@development> <20190928222206.thidzeygazl7axhg@development> <392e034c1b674a1a58c217dc440ea6197081ccfa.camel@j-davis.com> <20191001021114.iimd77xgnstaww7j@development> <15151.1570163761@sss.pgh.pa.us> <20191004082644.wytixiukkm6ditlu@development> <0278d32083d051f165c75d605d9fd1a82a197ef8.camel@j-davis.com> Comments: In-reply-to Peter Geoghegan message dated "Fri, 04 Oct 2019 11:43:06 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <10469.1570215529.1@sss.pgh.pa.us> Date: Fri, 04 Oct 2019 14:58:49 -0400 Message-ID: <10470.1570215529@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Peter Geoghegan writes: > On Fri, Oct 4, 2019 at 7:32 AM Jeff Davis wrote: >> The patch has been floating around for a very long time, so I don't >> remember exactly why I chose a signed value. Sorry. > I am reminded of the fact that int64 is used to size buffers within > tuplesort.c, because it needs to support negative availMem sizes -- > when huge allocations were first supported, tuplesort.c briefly used > "Size", which didn't work. Perhaps it had something to do with that. I wonder if we should make that use ssize_t instead. Probably not worth the trouble. regards, tom lane