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 1iT5au-0003j1-RC for pgsql-hackers@arkaria.postgresql.org; Fri, 08 Nov 2019 14:50:36 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iT5as-0003sb-HK for pgsql-hackers@arkaria.postgresql.org; Fri, 08 Nov 2019 14:50:34 +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 1iT5as-0003sS-5N for pgsql-hackers@lists.postgresql.org; Fri, 08 Nov 2019 14:50:34 +0000 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1iT5ap-0007nW-D6 for pgsql-hackers@postgresql.org; Fri, 08 Nov 2019 14:50:32 +0000 Received: by mail-wr1-x433.google.com with SMTP id z10so2043195wrs.12 for ; Fri, 08 Nov 2019 06:50:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=AsGzsuTvCiC0JBbfZqda1/4mrO+7HTtXSxxaF7NJjF8=; b=oIrRvkWluv5s1xNyY7S87/bNI0UOuElnAqCMO1Ja/aihgtzXrd1A4A/oHBPepTKT/y rkd9M0qYC6KDFG5be3lvqllndbifk3xr+Jhozrt+a7lK6aWrdCMtVUhB8n5i59O9bLQ6 hCPKBl4IHeSx3SoHURH/XxZtZ9s+ylrpRIi7gQrFVl4VOHumKe5WQk3XycOwMicpkUoF LZ6jJee9UsQfLxuPpsPumvRutlGmsva+ZoPHrOQZWtANIwviVzdCWVaogw9Lo5PzSXjL 4PiLpomMs39iEXNLqxs99XFAb/lG8Mjvf+71lTzGJV4c5rsSBITeYDwJEtXh0U8UV0Jp 4Omw== 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:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=AsGzsuTvCiC0JBbfZqda1/4mrO+7HTtXSxxaF7NJjF8=; b=TlPm/1ulWmWo0+GXERdgiR4bBjqgtMLMv374tDLdKdSayX3B6E2F9MWgZXkToYtA/b sT+SW3hMp07C772ipfjoj8YI4p3JOItkCTQhtnts3t1b8sE4x+abvqJCRtNcIsgjwY4j PGDK6SSx2Ot8jKXD/wf5GIBrB7O+RLrxIGeJ1YhBd2E73zpkeUHdSGL/A454gGw8454u JrIV5zoZtuP5cQDGtLMjRLNvvjuYiAJSScs58sGG5G9gOU4lRvI3PAwDbgUhPEQaU5zu eNWbqGbbCbC+c8ckwFzX0WohgeWarUHLLfrRImtI4VPTKoFaxup4odBVj4L/Mlv/fkfI 6MOQ== X-Gm-Message-State: APjAAAWOouhwAxNUrxsunDVcM6cfA1CPlcXZz+IJ5cmXONAv3mK4feDQ KCrX/u7z3leipwG/YMjuCEriyQ== X-Google-Smtp-Source: APXvYqxNnnR2N6npqzpT4cSEoCx6qBlFgOGB2ExGqdTq4yuz16daIfm72u7DIKwZ8R+VVFLUVX+93Q== X-Received: by 2002:adf:f489:: with SMTP id l9mr5810887wro.337.1573224629194; Fri, 08 Nov 2019 06:50:29 -0800 (PST) Received: from localhost (cst-prg-17-166.cust.vodafone.cz. [46.135.17.166]) by smtp.gmail.com with ESMTPSA id w7sm2212957wru.62.2019.11.08.06.50.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Nov 2019 06:50:28 -0800 (PST) Date: Fri, 8 Nov 2019 15:50:25 +0100 From: Tomas Vondra To: Christoph Berg , PostgreSQL Hackers Subject: Re: Monitoring disk space from within the server Message-ID: <20191108145025.d7pfcip6plufxiah@development> References: <20191108132419.GG8017@msg.df7cb.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20191108132419.GG8017@msg.df7cb.de> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Fri, Nov 08, 2019 at 02:24:19PM +0100, Christoph Berg wrote: >Monitoring the available disk space is the topmost thing on the >priority for PostgreSQL operation, yet this metric is not available >from the SQL level. > While I agree monitoring disk space is important, I think pretty much every deployment already does that using some other monitoring tool (which also monitors million other things). Also, I wonder how universal / reliable this actually is, considering the range of filesystems and related stuff (thin provisioning, quotas, ...) people use in production. I do recall a number of cases when "df" was showing a plenty of free space, but one of the internal resources for that particular filesystem was exhausted. I doubt it's desirable to add all this knowledge into PostgreSQL. It's not clear to me what issue this is actually meant to solve - it provides data, which is nice, but it still needs to be fed to some motinoring and alerting system. And every monitoring system has a good plugin to collect this type of data, so why not to use that? Surely, we can't rely on this for any internal logic - so why not to provide this as an extension? regards -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services