Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1okTLk-0006Ar-Ps for pgsql-novice@arkaria.postgresql.org; Mon, 17 Oct 2022 16:52:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1okTLi-0003YI-Iq for pgsql-novice@arkaria.postgresql.org; Mon, 17 Oct 2022 16:52:22 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1okTLi-0003Xt-8l for pgsql-novice@lists.postgresql.org; Mon, 17 Oct 2022 16:52:22 +0000 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1okTLd-0001wl-4o for pgsql-novice@lists.postgresql.org; Mon, 17 Oct 2022 16:52:21 +0000 Received: by mail-wr1-x42e.google.com with SMTP id j7so19380762wrr.3 for ; Mon, 17 Oct 2022 09:52:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=crunchydata.com; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=ni2+q7+sLS37drzk/lYJka9cfx8DTRnUTnNrv24tssg=; b=R4HFQo/lno61UmETVXzkGGdq6NOF0kuTUMOO0CfIrT3SJQcBhcrwYt0eCSJxrNx/Fh jmHmbo8eeGLWkXACgL+GvJh86AwpFYo295gHo6e1leEZD0uDLLDLjDyaHGXyLlG6JKSv GoYXon5UzR1p0IeBefpwOerpO47rgsDMXdciYZbxrr/ctUFxQnuXqWQ7M3ZXwAFzCo0C s/9x1jJrCQ3dQ+ZM4Ra/XHmu838JguKkveGHT2CJcOUDPGGTnW07PZ1sdTYzBilZp8W0 ucJTOxrrJrHQMv5E0hMjTW78IrGK7vNKnc84yJL0t5qCz9Z3nf6lvxmzVYF9DfcgGPXY TX3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ni2+q7+sLS37drzk/lYJka9cfx8DTRnUTnNrv24tssg=; b=KAtBAh1NCAOR2LH6T1f23zLCGD72+m+eQb/FQuXUJPLGkv2j7b5BlCYzQaBXCF+3T8 mCzfZi4SJsESRL9nk5uM7FOyosURNrW+pnTgY7R8VVPaV5Y+gBpqgrjHiw8Cscg+VJ4/ N0k3e5S0Q0Kdm845UhnhJab/lnPfO8ilvMvR40XsDN/GXKboTWxPfxuUnksNSHa5FMzH e68ZUCDY4dke/m6BAuXXgAJaNj+3KpAfFVzCrotPthtAOZIYM9yHtFFjEIy1o6mx+qzU u3+lzmiKQaKsRNI0HTJJPdybtibudehLNPIS7anHFcrz/0F5P7PRTww5XxjzFxfPmJ6O LC8A== X-Gm-Message-State: ACrzQf0GUTA2yVHU1Lzl9DTCnMMhDjdbXwWrxpnYm0Ayzf8fXUD6X2Q8 mh/wkdQlwZNdoEu+Zowxr1hZa8Fkv2hIHy7vbp1o3Q== X-Google-Smtp-Source: AMsMyM56c5C4m3vIBuM3A/1oDpeSweJKSRoSUCRaT0Co25OFpS/RpRSs/vwOKaSkqdcrmOT2gbALClpEmjh2SFX5Lsg= X-Received: by 2002:adf:f98b:0:b0:22e:3694:a5e1 with SMTP id f11-20020adff98b000000b0022e3694a5e1mr6962309wrr.134.1666025535631; Mon, 17 Oct 2022 09:52:15 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Keith Fiske Date: Mon, 17 Oct 2022 12:51:49 -0400 Message-ID: Subject: Re: Allocated size of DB? To: Ron Watkins Cc: pgsql-novice@lists.postgresql.org Content-Type: multipart/alternative; boundary="0000000000003d09de05eb3dcc00" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000003d09de05eb3dcc00 Content-Type: text/plain; charset="UTF-8" On Mon, Oct 17, 2022 at 12:48 PM Ron Watkins wrote: > I have a request to supply business owner with both the available size of > DB as well as the used size of the DB. I have been able to locate the used > size, but I don't see any way to query the available size (used + unused > space). How can I find that in PSQL? > > -- > Ron Watkins, K7DOG > 602.743.5272 > There is no unused space in PostgreSQL like this. It will use all the available space on disk that you give it. It is not like Oracle where you can reserve segment sizes. So for this, you'd just monitor your available space on disk for the filesystem that PostgreSQL is using. -- Keith Fiske Senior Database Engineer Crunchy Data - http://crunchydata.com --0000000000003d09de05eb3dcc00 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Mon, Oct 17, 2022 at 12:48 PM Ron = Watkins <rwatki@gmail.com> wr= ote:
I have a request to supply business owner with both the available siz= e of DB as well as the used size of the DB. I have been able to locate the = used size, but I don't see any way to query the available size (used=C2= =A0+ unused space). How can I find that in PSQL?

=
--
Ron Watkins, K7DOG
6= 02.743.5272


There is no unused= space in PostgreSQL like this. It will use all the available space on disk= that you give it. It is not like Oracle where you can reserve segment size= s.

So for this, you'd just monitor your availa= ble space=C2=A0on disk for the filesystem that PostgreSQL is using.

--
Keith Fiske
Senior Database Engineer
Crunc= hy Data - http://crunc= hydata.com
--0000000000003d09de05eb3dcc00--