Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1ffoPq-00014F-Ik for pgsql-admin@arkaria.postgresql.org; Wed, 18 Jul 2018 15:30:58 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ffoPp-0000Q3-4b for pgsql-admin@arkaria.postgresql.org; Wed, 18 Jul 2018 15:30:57 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1ffoPo-0000Pv-Pr for pgsql-admin@lists.postgresql.org; Wed, 18 Jul 2018 15:30:56 +0000 Received: from mtaout005-public.msg.strl.va.charter.net ([68.114.190.30]) by makus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ffoPm-000070-6d for pgsql-admin@postgresql.org; Wed, 18 Jul 2018 15:30:55 +0000 Received: from impout002 ([68.114.189.17]) by mtaout005.msg.strl.va.charter.net (InterMail vM.9.00.023.01 201-2473-194) with ESMTP id <20180718153053.SODV7356.mtaout005.msg.strl.va.charter.net@impout002>; Wed, 18 Jul 2018 10:30:53 -0500 Received: from cerberus.crazybean.net ([24.151.10.150]) by impout002 with charter.net id CFWs1y00H3EE3TL01FWs5z; Wed, 18 Jul 2018 10:30:53 -0500 X-Authority-Analysis: v=2.2 cv=C6eZ8UH+ c=1 sm=1 tr=0 a=D2HTw/M6/8MmcHighGO7rg==:117 a=D2HTw/M6/8MmcHighGO7rg==:17 a=kj9zAlcOel0A:10 a=xqWC_Br6kY4A:10 a=3GLR1-XzZKwA:10 a=R9QF1RCXAYgA:10 a=pGLkceISAAAA:8 a=mNbbusm6NxB3JnUpk7MA:9 a=CjuIK1q_8ugA:10 Received: from [IPv6:2001:470:e117:4:b8e2:45c2:da:2ac0] (2001:470:e117:4:b8e2:45c2:da:2ac0 [IPv6:2001:470:e117:4:b8e2:45c2:da:2ac0]) by cerberus.crazybean.net (OpenSMTPD) with ESMTPSA id 5f89d367 (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO); Wed, 18 Jul 2018 11:30:52 -0400 (EDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.0 \(3445.100.17\)) Subject: Re: [Admin] Reclaim Space from 4 TB Database From: Rui DeSousa In-Reply-To: Date: Wed, 18 Jul 2018 11:30:51 -0400 Cc: "pgsql-admin@postgresql.org" Content-Transfer-Encoding: quoted-printable Message-Id: <70718D12-F9B1-48D1-9370-CF3720E07A05@crazybean.net> References: To: Rahul Saha X-Mailer: Apple Mail (2.3445.100.17) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk > On Jul 18, 2018, at 6:17 AM, Rahul Saha = wrote: >=20 > Hi Experts, >=20 > Greetings !! >=20 > Background - PG version 9.4 > Linux - Rhel >=20 > I have a scenario in production environment where the DB size is close = to 4 TB and couple of tables are 1.5TB each.=20 >=20 > Now, as the table are highly transactional therefore there is lot of = bloat in tables. While I run Vaccum Full in weekend when there is no = incoming connection, vacuum full never completes in 2 days.=20 >=20 > Firstly, I wanted to know what are the factor I should consider to = speed up Vacuum Full process other than investing memory.=20 >=20 > Secondly are there any other option to reclaim space. (Pg_repck is a = option). I am looking for more option if available.=20 >=20 > Thank you everyone.=20 > --=20 > Thanks & Regards > Rahul Saha >=20 > +91 8806351116 >=20 > Sent from my iPhone If the table are highly transactional and you have auto vacuum enabled = then the tables really should normalize. I would suggest looking at = your auto vacuum settings and being more aggressive about them. Also = consider upgrading to the latest version of Postgres as much work has = been done to improve auto vacuum. =20=