Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YRWxF-0000Fh-7y for pgsql-hackers@arkaria.postgresql.org; Sat, 28 Feb 2015 02:16:33 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YRWxE-0007hw-NV for pgsql-hackers@arkaria.postgresql.org; Sat, 28 Feb 2015 02:16:32 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YRWxD-0007hm-2Y for pgsql-hackers@postgresql.org; Sat, 28 Feb 2015 02:16:31 +0000 Received: from tamriel.snowman.net ([2001:4830:167b::11]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YRWx5-0001ur-SU for pgsql-hackers@postgresql.org; Sat, 28 Feb 2015 02:16:30 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id 4DE5C5F7A3; Fri, 27 Feb 2015 21:16:23 -0500 (EST) Date: Fri, 27 Feb 2015 21:16:23 -0500 From: Stephen Frost To: Tom Lane Cc: Jeff Davis , pgsql-hackers@postgresql.org, Andres Freund , Tomas Vondra Subject: Re: Re: [COMMITTERS] pgsql: Invent a memory context reset/delete callback mechanism. Message-ID: <20150228021623.GZ29780@tamriel.snowman.net> References: <1425086819.12308.273.camel@jeff-desktop> <29787.1425087767@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="vMk55pD2JuhdWiRw" Content-Disposition: inline In-Reply-To: <29787.1425087767@sss.pgh.pa.us> X-Editor: Vim http://www.vim.org/ X-Info: http://www.snowman.net X-Operating-System: Linux/3.13.0-45-generic (x86_64) X-Uptime: 21:14:05 up 37 days, 2:03, 4 users, load average: 0.04, 0.09, 0.12 User-Agent: Mutt/1.5.21 (2010-09-15) X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org --vMk55pD2JuhdWiRw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Tom Lane (tgl@sss.pgh.pa.us) wrote: > Jeff Davis writes: > > On Fri, 2015-02-27 at 22:17 +0000, Tom Lane wrote: > >> In passing, per discussion, rearrange some boolean fields in struct > >> MemoryContextData so as to avoid wasted padding space. For safety, > >> this requires making allowInCritSection's existence unconditional; > >> but I think that's a better approach than what was there anyway. >=20 > > I notice that this uses the bytes in MemoryContextData that I was hoping > > to use for the memory accounting patch (for memory-bounded HashAgg). >=20 > Meh. I thought Andres' complaint about that was unfounded anyway ;-). > But I don't really see why a memory accounting patch should be expected to > have zero footprint. For my 2c, I agree that it's a bit ugly to waste space due to padding, but I'm all about improving the memory accounting and would feel that's well worth having a slightly larger MemoryContextData. In other words, I agree with Tom that it doesn't need to have a zero footprint, but disagree about wasting space due to padding. :D Thanks! Stephen --vMk55pD2JuhdWiRw Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJU8ST2AAoJEO1sijiDR2RVmd0QAMTK58ubfPHx/wXJWyNt0nyd Le6ZIewDNgm4/BztV5A1elSgJW1p+VZvECxxhopFPMqdprUgtjRj7TnkHo9wLrk7 a6BPR5+P9hcabe4lJ7+MojFtDop5WD29xpWRPaPtKDXsSvaizsyd+kiMuouE2jpH iKp5kgSfpMXSJI9F12XGUDl3rLiPtPX2ZDgsP5zXEh2e/U1hF8QoKCTd6PTMwZ5v Qr3dLLw2ysHZiuPZNAsBSTAa28hcFoMeT/ilBnRE1kx6vEjsPuM/Vvy1Z9mOpk3f mbdApRRwiydIbozK8IEF7ncAxn0rY6/xzwE2dRatk8e1aO63uMg8zra1AemKQMcT lI7f6mFe0IFTuuG2sxi0dVKqL9SalWp4Q/ysSvC0HpLmSR9tTmMw7XOK/P/78KY7 Z0RgEAamjh13g1d1mkggbyWfPiXKjoh+N8epVR+RmwLI7gW/KNbor6/mSsEXixO3 H5biDoWNTtNQJLGwT+Y3c3TzKG2yNFoaGphZJyCbtfaDcfMiLcdBN62PCX6jNr3c dy0jnDjneHzCo7+EBv22OborgzPPqQAZG7X8ivSdzufTus3Kn/pZbdy2CiQ3bXtJ VHt4ioNgMntDI+LFMiwGGSlxbZSomnKNzaP4aqLuHhgoxLZKaOe2aRTe4ZcDmYz7 CZfwqR/5THZ/HcgXkTpq =Gbab -----END PGP SIGNATURE----- --vMk55pD2JuhdWiRw--