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 1glXcc-0001Db-6F for pgsql-admin@arkaria.postgresql.org; Mon, 21 Jan 2019 11:20: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 1glXca-0002QO-Hi for pgsql-admin@arkaria.postgresql.org; Mon, 21 Jan 2019 11:20:04 +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 1glXca-0002QH-AA for pgsql-admin@lists.postgresql.org; Mon, 21 Jan 2019 11:20:04 +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 1glXcY-0004Vn-20 for pgsql-admin@lists.postgresql.org; Mon, 21 Jan 2019 11:20:03 +0000 Received: from [192.168.127.1] (port=50190 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 1glXcV-000EfN-Ub; Mon, 21 Jan 2019 11:19:59 +0000 Received: from [127.0.0.1] (port=13656 helo=caithnard.riddles.org.uk) by caithnard.riddles.org.uk with esmtp (Exim 4.89 (FreeBSD)) (envelope-from ) id 1glXcU-000Hxf-Ug; Mon, 21 Jan 2019 11:19:59 +0000 From: Andrew Gierth To: Horst =?utf-8?Q?D=C3=BCster?= Cc: pgsql-admin@lists.postgresql.org Subject: Re: Huge table pg_shdepend In-Reply-To: <7ecdbaa3-07a6-1ec1-d991-06440c05b4cb@sourcepole.ch> ("Horst \=\?utf-8\?Q\?D\=C3\=BCster\=22's\?\= message of "Mon, 21 Jan 2019 11:18:37 +0100") Message-ID: <87o98a468n.fsf@news-spur.riddles.org.uk> References: <7ecdbaa3-07a6-1ec1-d991-06440c05b4cb@sourcepole.ch> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (berkeley-unix) Date: Mon, 21 Jan 2019 11:19:58 +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> Hi Horst> I'm struggling with a huge table pg_shdepend. My database has a Horst> size of 640MB exclude the size of the system tables. But the Horst> real size of the db is more than 2GB. The reason is a huge table Horst> pg_shdepend with more than 32000000 records. pg_shdepend has a row for every object and every ACL entry that records which role (other than the initial db superuser) owns the object or is referenced from the ACL entry. Do you have an unusually large number of tables (or other database objects)? Note that there's a single pg_shdepend table shared between all databases in the cluster; it's not part of any single database but rather is a "global" table. So what matters is the total number of objects over all databases, not the size of any single db. --=20 Andrew (irc:RhodiumToad)