Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eJFXr-0002qj-6Q for pgsql-general@arkaria.postgresql.org; Mon, 27 Nov 2017 09:17:43 +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 1eJFXq-0000vP-P0 for pgsql-general@arkaria.postgresql.org; Mon, 27 Nov 2017 09:17:42 +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 1eJFXq-0000vF-HR for pgsql-general@lists.postgresql.org; Mon, 27 Nov 2017 09:17:42 +0000 Received: from mimolette.dalibo.net ([212.85.157.144] helo=mail.dalibo.com) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eJFXj-0006XN-1T for pgsql-general@postgresql.org; Mon, 27 Nov 2017 09:17:41 +0000 Received: from stefan.dalibo.local (unknown [91.180.137.233]) by mail.dalibo.com (Postfix) with ESMTPSA id C6A1E2C0174; Mon, 27 Nov 2017 10:17:31 +0100 (CET) Subject: Re: Table and Index bloating To: Vikas Sharma References: Cc: pgsql-general@postgresql.org From: Stefan Fercot Message-ID: Date: Mon, 27 Nov 2017 10:17:30 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="TBLaM15CTgfs4OIECqQN5E8GkCTvlKNOs" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --TBLaM15CTgfs4OIECqQN5E8GkCTvlKNOs Content-Type: multipart/mixed; boundary="2sth46hvp5UOSvo6FH64OfS62h1FT71cF"; protected-headers="v1" From: Stefan Fercot To: Vikas Sharma Cc: pgsql-general@postgresql.org Message-ID: Subject: Re: Table and Index bloating References: In-Reply-To: --2sth46hvp5UOSvo6FH64OfS62h1FT71cF Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-Language: fr-classic Hi, You can track that with some monitoring tools like check_pgactivity. The queries can be found here : https://github.com/ioguix/pgsql-bloat-estimation. Tables : https://github.com/ioguix/pgsql-bloat-estimation/blob/master/table/table_= bloat.sql Indexes : https://github.com/ioguix/pgsql-bloat-estimation/blob/master/btree/btree_= bloat.sql Backups should also be part of your maintenance plan. Vacuum/Analyse/Reindex is already a good basis. Kind regards On 11/27/2017 10:10 AM, Vikas Sharma wrote: > Hi All, > > Could someone please provide the query/queries=C2=A0 to find table and > Index bloating in PgSql 9.3 onwards?=C2=A0 > and are there any other maintenance tasks inPgSql except vacuum & analy= se. > > Regards > Vikas --=20 Stefan FERCOT http://dalibo.com - http://dalibo.org --2sth46hvp5UOSvo6FH64OfS62h1FT71cF-- --TBLaM15CTgfs4OIECqQN5E8GkCTvlKNOs Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEGqVD/TfbxT1NtG2cKv35I2qhWC8FAlob2CoACgkQKv35I2qh WC+tOwf+PPyYSA+3aesc0l7CzIwoyDYjCt34ejirWjdFD3yXx6YidHDbI0ATtjw6 p1ObKSDG6UZjC8Cz7fEnwQ10Pqb2/FgtKj8L7z3ATtFkav1/iTseGGEtDyPHHLZR KFq5FKHybskIsuwIDSBTxwb5hfoJyHyP0+3zqdCpdeV7gSnW5cnEDLRf1Emk2ZG8 Zk9D40ABXncHXf2WyBC+ZaNwcA7CFlKOBcuFIOGWeUSu5aXmTgsSuHhVBBs+FFnq QHLz7/sOa/IAlLP7pZqUBIA75/xnXEjWqWloTV+QRBQac8FrNpPMgfUiTCuh97AT DbCQMt5cw6ieSjJOr51eE7+rR2MaSA== =kkgG -----END PGP SIGNATURE----- --TBLaM15CTgfs4OIECqQN5E8GkCTvlKNOs--