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 1iGOa1-00020E-Qf for pgsql-hackers@arkaria.postgresql.org; Fri, 04 Oct 2019 14:29:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iGOa0-0005A0-LS for pgsql-hackers@arkaria.postgresql.org; Fri, 04 Oct 2019 14:29:12 +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 1iGOa0-00059q-8l for pgsql-hackers@lists.postgresql.org; Fri, 04 Oct 2019 14:29:12 +0000 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iGOZx-0007xH-Dr for pgsql-hackers@postgresql.org; Fri, 04 Oct 2019 14:29:11 +0000 Received: by mail-wm1-x344.google.com with SMTP id v17so6098418wml.4 for ; Fri, 04 Oct 2019 07:29:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=ZR6kVPSFbTQ0qUtRJqbktLgKN/JuFXUcT5EOCcTX7Gg=; b=FKy44VduG3Oss9eWIyrkFcq8HuYCd1e7H3BVA5Me5rEPai/30xFoYpUvVzWKVm2FhN hw5us4eOakgwiJsHX5xOuvEsip4+5ccR1ye0v3LpW4mERbS9iaungSvNa1ZXELtQ4QVt PUp0rr1NohPN2Q5DiirjxaMbe2T4LGWMHIdEqlCCw3yDHZuCFX/KAUPNovvs6d4Ww+1P 9PLgLUaa5E8l/0KDZ8O/RbMBJ0LHmV560awH6g8RiCGczv9sIKK1CSGHcr4NzpuRK7nx BGLwgKuRK9g62JdyBEiodb9PF9WPLxO1cozPeJ7VI4DYpTaPxqLkskfyYgxxAvLXhPlo bIlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=ZR6kVPSFbTQ0qUtRJqbktLgKN/JuFXUcT5EOCcTX7Gg=; b=Z1VsE46QHIaAlRTBhYxhaGSMDFDNS66l7SfaPm1wVzim4GYT6cVn2HY4LGk7VaitjO E0qeCcXmLwIUIWD1Zx1ohZVvVbEwUOwUf2WeXPnwCsIBFms/wQh3u6SNCYxbzNiXFc+2 KQHxGEeWtQ2uNgW4enKB4pULm5JOe6Pjd6ZHw9efIH9IoB9Sa7tAsX0jejtnrqrb35oo 1c+EkHWv39RqZzUvn9SZwOTIyXNAfjP1vdPsRbq69gUVniOmwKDIuyZr4x+bVj1VARWW RiCA0PB9wKxae0ySZeNb2Umb202/to88s98xQ/yhhBPoHq/hwXIZUhfXtlnwbmnY8oTe 9kXQ== X-Gm-Message-State: APjAAAUM4Muiws2YBj3ANZaR/g+r/cVPH4q1aalmiYP4lbw64A45PRY4 y2InSf5TBCxuT3TK7INztAJfKA== X-Google-Smtp-Source: APXvYqw1J3hVqIfu7LRoKW3hM2ZWNo6wC84/xNFWCl1ffFHZE3DD8K6Xn0x3KfFgZbxKC1Q+KGHZkA== X-Received: by 2002:a1c:f003:: with SMTP id a3mr11640607wmb.41.1570199346934; Fri, 04 Oct 2019 07:29:06 -0700 (PDT) Received: from localhost (ip-86-49-253-183.net.upcbroadband.cz. [86.49.253.183]) by smtp.gmail.com with ESMTPSA id o19sm10193530wmh.27.2019.10.04.07.29.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Oct 2019 07:29:06 -0700 (PDT) Date: Fri, 4 Oct 2019 16:29:03 +0200 From: Tomas Vondra To: Tom Lane Cc: Jeff Davis , Melanie Plageman , Soumyadeep Chakraborty , Robert Haas , Pg Hackers , soumyadeep2007@gmail.com Subject: Re: Memory Accounting Message-ID: <20191004142903.hjqv5e6ica76xfxm@development> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20191004082644.wytixiukkm6ditlu@development> User-Agent: NeoMutt/20180716 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Fri, Oct 04, 2019 at 10:26:44AM +0200, Tomas Vondra wrote: >On Fri, Oct 04, 2019 at 12:36:01AM -0400, Tom Lane wrote: >>I haven't chased down exactly what else would need to change. >>It might be that s/int64/Size/g throughout the patch is >>sufficient, but I haven't analyzed it. >> > >I think so too, but I'll take a closer look in the afternoon, unless you >beat me to it. > I've pushed a fix changing the type to Size, splitting the mem_allocated to two separate updates (to prevent any underflows in the subtraction). Hopefully this fixes the 32-bit machines ... regards -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services