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 1gc2Bl-0003jb-QK for pgsql-hackers@arkaria.postgresql.org; Wed, 26 Dec 2018 05:57:06 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gc2Bk-0007f9-2I for pgsql-hackers@arkaria.postgresql.org; Wed, 26 Dec 2018 05:57:04 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gc2Bi-0007f2-50 for pgsql-hackers@lists.postgresql.org; Wed, 26 Dec 2018 05:57:03 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gc2Ba-0003Vs-7A for pgsql-hackers@postgresql.org; Wed, 26 Dec 2018 05:57:00 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 83B0021609; Wed, 26 Dec 2018 00:56:52 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Wed, 26 Dec 2018 00:56:52 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm3; bh=uaDjm7srF6RWXzSFZ1Z/zwkBCt3 D7FYd/JqgXZS8fGg=; b=iNPvdnEeyk4UqhIzPVtBlGqEI54bj8fGUWsJdE1YW/+ Dqd59TGd7ArWT9NG18i7dJDJrKn2Qpb2stsQYXyteppUjVBQTESM/jw+x8W1PyIE Asae8mR5HNQX3HIg+lN9uUiDa63T3llQVCcbJxashL6gKzD9ZbYQjibJJUKbp5tb AMy/q1U2GCSyxbmGOj3i0nzqN63OmPYlqfbCqQBYuQEnthUr49iVM8FcnOpCweRR 2HPAuJygs82QWjIAXhUtJWEKyShJ14fUZlVMeTo47VOgXk7IQ0WqX4I7KCfWEQJ5 47fjkmPqumfEu0iJJ41CaSWJM0rdPtj7KsGJdXpVKrg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=uaDjm7 srF6RWXzSFZ1Z/zwkBCt3D7FYd/JqgXZS8fGg=; b=Zy+djR/0PzZkyttb86e4zF BysMO3B1WoRDrS5DT2SbqbnMiDdSm2FtG61NlzV5k5HzX7AtrKnw57i3QHUnuFQQ ZN0OcEqwXnMyu+n23xG8NMxO0qsz3s/6/8XMSwUeEOL6ttV0mC2jh6c8VGxAEF+d Y5gOr2LwIFfwI4FySWZ50j8dfbByDbVFqs2vEaZ4UPCUOHsoHDygZUKhiGlQf0NC SEmaeFCiBbm8rgpZYDkc9fxzugYqwZSy9ak07xgY7xLzZ5fgu3E0uiBhbZt00ngM BVoFeleJ2/mrU0X31UtP4REWX4FFYbTYW+hbX45V7PV7vy+q4RPy4R6KltTmCf0Q == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedtkedrudekgedgleduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfquhhtnecuuegrihhlohhuthemucef tddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfghrlhcuvffnffculdejtd dmnecujfgurhepfffhvffukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpefoihgt hhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesphgrqhhuihgvrhdrgiihiieqne cukfhppeduudekrddvgedurddvhedurdduhedvnecurfgrrhgrmhepmhgrihhlfhhrohhm pehmihgthhgrvghlsehprghquhhivghrrdighiiinecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from paquier.xyz (mp76f1fb98.ap.nuro.jp [118.241.251.152]) by mail.messagingengine.com (Postfix) with ESMTPA id 3BD6710084; Wed, 26 Dec 2018 00:56:50 -0500 (EST) Date: Wed, 26 Dec 2018 14:56:47 +0900 From: Michael Paquier To: Robert Haas Cc: hawang@pivotal.io, "pgsql-hackers@postgresql.org" , Tomas Vondra Subject: Re: Control your disk usage in PG: Introduction to Disk Quota Extension Message-ID: <20181226055647.GK2234@paquier.xyz> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="75WsOQSofUOhcSOp" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --75WsOQSofUOhcSOp Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Nov 21, 2018 at 09:47:44AM -0500, Robert Haas wrote: > +1 for adding some hooks to support this kind of thing, but I think > the names you've chosen are not very good. The hook name should > describe the place from which it is called, not the purpose for which > one imagines that it will be used, because somebody else might imagine > another use. Both BufferExtendCheckPerms_hook_type and > SmgrStat_hook_type are imagining that they know what the hook does - > CheckPerms in the first case and Stat in the second case. I personally don't mind making Postgres more pluggable, but I don't think that we actually need the extra ones proposed here at the layer of smgr, as smgr is already a layer designed to call an underlying set of APIs able to extend, unlink, etc. depending on the storage type. > For this particular purpose, I don't immediately see why you need a > hook in both places. If ReadBuffer is called with P_NEW, aren't we > guaranteed to end up in smgrextend()? Yes, that's a bit awkward. -- Michael --75WsOQSofUOhcSOp Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAlwjGB8ACgkQnvQgOdby QH3+6Q/+Lh4wCJDZXp7jBEjvkAmlY5Ny2YACfTC6FFsCnOtnuYlD3anRLFni9oR9 Qpey3tg4c1rQjdwYGgp0l2nN7ZXspXaP62JjPUFpASVtEIwtergY+XQrXRN//Mq+ emnicpwghDKp8tZhzYDFumVjEfcj+KSJTveT0TNB0W/N/odZLH17vZeptwwWTWqa RZ/HMBco+dH+lNGskTXV6qXLAv9suSwjN6k0JipB4KBCyKd1otam3fjiXi5Kbsnm Z2hOGRyQI8nrh/O4XzLxYBdxIUiKOa+luzphp/YNAZgCT1KAu9sIATihc1dN8bn8 z0Z981iX4Pd5lflPgD6Tnn0OT+9Br7ERylCXakLGjyoSrmIbAaOREHekcuE15Jew rqFzwewT6Mrn92WUjjXHgZ6ODeckTUHNWhMuWVylwUA8VESso1E99LMr8wxmxqV0 cpTKLJwOXzRYgbz49PdJlImIMDYR4hdclsCBDzF2+1VStPclgphaHbaNO4QEOqc9 4jer3HSUYFRVnXpmn1MfRjh/H/g/NAfrEhcm0F+v+poPKH/PuCRwpJzaDDUKvFM/ O7kzpfgG+/NY2Sj8U0YV7QAepXH1ylGEYfKKT8CdlR9whgLEtCKPaCoBoT9dqkAF hguFIV/95WLgA6aX9eTTvsa4XaiB7gLRLoSwZGgtl/7i/HA6WBw= =uqO+ -----END PGP SIGNATURE----- --75WsOQSofUOhcSOp--