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 1glaTE-0003yy-HR for pgsql-admin@arkaria.postgresql.org; Mon, 21 Jan 2019 14:22: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 1glaTC-0000hA-TT for pgsql-admin@arkaria.postgresql.org; Mon, 21 Jan 2019 14:22:34 +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_SHA1:256) (Exim 4.89) (envelope-from ) id 1glaTC-0000gx-MD for pgsql-admin@lists.postgresql.org; Mon, 21 Jan 2019 14:22:34 +0000 Received: from lungold.riddles.org.uk ([82.68.208.19]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1glaT8-0000L1-Tj for pgsql-admin@lists.postgresql.org; Mon, 21 Jan 2019 14:22:34 +0000 Received: from [192.168.127.1] (port=37101 helo=caithnard.riddles.org.uk) by lungold.riddles.org.uk with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.88 (FreeBSD)) (envelope-from ) id 1glaT6-000EsD-Ui; Mon, 21 Jan 2019 14:22:28 +0000 Received: from [127.0.0.1] (port=38101 helo=caithnard.riddles.org.uk) by caithnard.riddles.org.uk with esmtp (Exim 4.89 (FreeBSD)) (envelope-from ) id 1glaT6-000Ip2-4q; Mon, 21 Jan 2019 14:22:28 +0000 From: Andrew Gierth To: Horst =?utf-8?Q?D=C3=BCster?= Cc: pgsql-admin@lists.postgresql.org Subject: Re: Calculation of db size In-Reply-To: <3d17ce68-70b6-677c-311e-b05b5195ba35@sourcepole.ch> ("Horst \=\?utf-8\?Q\?D\=C3\=BCster\=22's\?\= message of "Mon, 21 Jan 2019 15:09:24 +0100") Message-ID: <87fttm3xlm.fsf@news-spur.riddles.org.uk> References: <3d17ce68-70b6-677c-311e-b05b5195ba35@sourcepole.ch> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (berkeley-unix) Date: Mon, 21 Jan 2019 14:22:27 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk >>>>> "Horst" =3D=3D Horst D=C3=BCster writes: Horst> Then I have a subsequent question. Horst> Does the query Horst> SELECT g_database_size('dbname'); Horst> take into account the storage space of the table pg_shdepend or Horst> not? It does not. Nor does it include the other global tables, such as pg_database, pg_authid, etc. To get the list of global tables and their indexes, use: select relname from pg_class where relisshared;=20=20 The size of the global tables and indexes, which don't count towards the size of any individual database, can be obtained with pg_tablespace_size('pg_global'). (All global tables must be in the pg_global tablespace, and no other tables are allowed there.) --=20 Andrew (irc:RhodiumToad)