Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1edEin-00006w-4j for pgsql-general@arkaria.postgresql.org; Sun, 21 Jan 2018 12:27:37 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1edEil-0002LQ-0j for pgsql-general@arkaria.postgresql.org; Sun, 21 Jan 2018 12:27:35 +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_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1edEik-0002LG-PH for pgsql-general@lists.postgresql.org; Sun, 21 Jan 2018 12:27:34 +0000 Received: from mail-pg0-x242.google.com ([2607:f8b0:400e:c05::242]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1edEib-0004lo-Mx for pgsql-general@postgresql.org; Sun, 21 Jan 2018 12:27:34 +0000 Received: by mail-pg0-x242.google.com with SMTP id w17so4917167pgv.6 for ; Sun, 21 Jan 2018 04:27:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=K6JYPer6wrvvrpatAXKNcy9tgk2h0dHzudika2ISGXM=; b=dsb7tQcpd8hwbrOXvWbZC7HrSDDAbirWX7s4f65vGiy32njMDpbWWpu6RLeoAZmcjK 0g7WV+hx1w4KO8nr3qcPvqor2Kf/qmwUQ07xDWCUYq3diBrN527sSiDWExBmIMPVm+I0 hfvjstHM2fO7TydrYgf+47ONe0TRDsp0eNedDDFFGmpmWeX9MqYXDVS9Ue3b04mUQNRi gAhsAXRy99zTXmYDkpv/yoEqJfFYLVVe6I1fgjwUGGIM9p9pH9tlq0oVagSHwPawRMaQ LDM3Cn9QpCQZReRSK6bKgBYV1quspL8LGqf/Dyrimx1ny8D3n19NPmzK9OloLKGdn6Vn GWzw== 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; bh=K6JYPer6wrvvrpatAXKNcy9tgk2h0dHzudika2ISGXM=; b=TRanQVENCX6yN9jpH63fz4muT1UR7qdSLVCmMp6umoj4FePRMwFKH9vBa4WICP+8aD lj8jfPJ2qX2/qKVCFhQKW3XVCjXKQGkICNAVyH+rJORfHeKg25v01Nbd7P35y18C57Gx kT1tPbtKEGt5bDUfjsxL3sWVivGsJ4ZHPhLtLNoqJ+jTus+f9umhHGLk+/uxQzu3Q6M7 +YyPBNL/F0q78ybguxDYTbCDYw3TFng3t9OcLb5mez0Y2sMYavyCy17inNu+4696EWUS X6EkupwZ8DHnGIY3HiuC5YyPZO4Itwsf5jQps+zlrzGI5PSktmKhzfssmGTbChr7dRcI eVwQ== X-Gm-Message-State: AKwxytcy3Onu9+s1u7aWQp0frcV059Zu5vHROA9YNQa2/iXo/WdSaEJS C3pCxypxXrSzX1vxmGYUsN4= X-Google-Smtp-Source: AH8x227j1a09YSW0OPfMuk4vpprDwYrqFIo3OyWqDgmBnzc0dzEyobOdHg/pe19QHXSmcftDj4Zf9Q== X-Received: by 10.99.113.7 with SMTP id m7mr68032pgc.403.1516537643563; Sun, 21 Jan 2018 04:27:23 -0800 (PST) Received: from paquier.xyz (c137162.net61215.cablenet.ne.jp. [61.215.137.162]) by smtp.gmail.com with ESMTPSA id w124sm25809161pfw.90.2018.01.21.04.27.20 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 21 Jan 2018 04:27:22 -0800 (PST) Date: Sun, 21 Jan 2018 21:27:18 +0900 From: Michael Paquier To: Raymond O'Donnell Cc: hmidi slim , pgsql-general@postgresql.org Subject: Re: Notify client when a table was full Message-ID: <20180121122718.GH1311@paquier.xyz> References: <2f4c0da8-9ae8-4262-667e-538d5f6f67ec@iol.ie> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="o7gdRJTuwFmWapyH" Content-Disposition: inline In-Reply-To: <2f4c0da8-9ae8-4262-667e-538d5f6f67ec@iol.ie> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --o7gdRJTuwFmWapyH Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jan 19, 2018 at 03:40:01PM +0000, Raymond O'Donnell wrote: > On 19/01/18 15:34, hmidi slim wrote: >> Hi, >> I'm looking for a function in postgresql which notify the client if a >> table was full or not.So I found the function Notify >> https://www.postgresql.org/docs/9.0/static/sql-notify.html. >> This function send a notification when a new action was done to the >> table. Is there a way to send a notification only=A0 when the table was >> full and no future actions (insertion of new rows for examples) will be >> done. I was connected to an external api and saving the data received >> from it to a postgres database and I want to be notified when the table >> was full and no rows will be inserted. Does it realizable or Should I >> create a trigger and listens for every insertion and notify the client? >=20 > How do you define "full"? There could be two definitions here: 1) A table contains more data than a customly-defined amount of data on-disk. 2) The partition where the table data is located runs out of disk space. -- Michael --o7gdRJTuwFmWapyH Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAlpkhyYACgkQnvQgOdby QH3grw/9H5maqabnU48/8endit8p6e0wWbEPwYHdmd8iy4ZMJ9f0gXvceSlmQll9 K9gyJW6hTw+o3UngWMx2Ng1jcXP6vfUd/lI5JdvvbnBmJl3snllum1wSJH7sdDUH tP1OGYOgGakvn+xoW6vTwGATPJSD3+hcyxldWzxozehNiNhn3gaM+SRuuE3XE3US hmgfu7m6/u+ddVXlaAJuFIbnvT3S5gHS8sLif5z4a2Tl8jyPZF6x46oBO45Y/fY8 IpzsKpoI8thGeIKHZOaEW5e4C6Kz21JQtpDnHDngdxaporJh35ZRlxrT/CUCuvGB ms57zHaKPI1Avhzcc7eU6bloEJ6JIkLuJTEARZXUb+PBRACvl7FWqcE3iBqc/T2/ yACcFf0yf/4XSFBHruM8Bvfv1oOkhlffqST56cKY9piiEd3YxbsJ+uZRBSHQRPOv juYuL+8o7MHEZr/Evyhm8WxvU6s4EYeL0T+6zjxtiMYv1pM3i5uw0oa/kZGsc6zy XzekG96M1YgxJNzQjhv0zRvSb2MHZHtzh3yW31iuZZzto+jpP8DBOC7rekzJuPNV K/f7VsuwCXiLUsQHzeKLF8sJ+G+L6zdH9wJ3VVqSp28IwPrbbnRELObYS64K+ClR ecxXZ1HbvKitymwZGJgxaIZwtN8TcUHcLp+Q4+XUUvo/JiwhdgI= =IPGy -----END PGP SIGNATURE----- --o7gdRJTuwFmWapyH--