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 1jR0Vm-0004N8-Jg for pgsql-general@arkaria.postgresql.org; Tue, 21 Apr 2020 21:32:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jR0Vl-0006dJ-Bz for pgsql-general@arkaria.postgresql.org; Tue, 21 Apr 2020 21:32:57 +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 1jR0Vk-0006cl-Pi for pgsql-general@lists.postgresql.org; Tue, 21 Apr 2020 21:32:57 +0000 Received: from sonic307-9.consmr.mail.ne1.yahoo.com ([66.163.190.32]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jR0Vd-0000gD-Kr for pgsql-general@postgresql.org; Tue, 21 Apr 2020 21:32:55 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1587504767; bh=jE+kHcRylfiyAq9n9G2UZ51njLsodcSw2Aazy4jrTgU=; h=Date:From:Reply-To:To:In-Reply-To:References:Subject:From:Subject; b=frYZKLvFp4kmuTn79X5Gga2NvsmGHKf9QI7uI+R0Ch/bgI6fbB1xBwQj5UGrfaer7OcsU3+XW/trReMWxgtH0YQeqHFe0QYrwtdAY+fOY4NlltI3GdwYMmfrfIkLBX0BTnrAF8FL+yZ19cP200oBQ9hjLLPce+lDkbkxw3OZo1mdBwcazdmu20qXQfy5+atnEVI08PnfSCY/w/29G3O03Ga9q1b9RyL8tLABGjmsoGlTTC2GWP/Bkqd61qYLVvHDO26xmlu04rr32oVwP3sZcp72Us9qyFGIx9epv8fXHhgE8bPpHQ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C97hqBLJUgwteGOXlMP xk9bHFQ0H6h2JR2.MkPhYXJ2JhypR95BqZzEUarx8bcSKx1cHBiolEoSs2VkjBDfuSqWyCdByNmX YhoNKiBIdy8islRj2ZhA9cXw2CB.m3eUSj1GXrZulUnOl9zWu9iZ5MDsDk72HZ_iGsi2E7FqCztA 3z6bGX8KjR6oLE8H0679rJnJkPr3oBEj2mo9zpul5hPXqFAbf1JIibLdZDcqmJfP64HCroE7URsa RUNk_wVO72004L3CpWSrlynjwoZJSTXEBX5uMRIxn47wQ8_Cn5n_lMhf69vCNtqF56APHU5w2R7A i3PfqJKr8MQJnvvHBBb5vKEBV1zhD04gH8B3a2g-- Received: from sonic.gate.mail.ne1.yahoo.com by sonic307.consmr.mail.ne1.yahoo.com with HTTP; Tue, 21 Apr 2020 21:32:47 +0000 Date: Tue, 21 Apr 2020 21:32:41 +0000 (UTC) From: Virendra Kumar Reply-To: Virendra Kumar To: "pgsql-general@postgresql.org" , Kevin Brannen Message-ID: <932472069.554849.1587504761819@mail.yahoo.com> In-Reply-To: References: Subject: Re: how to slow down parts of Pg MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_554848_1619880971.1587504761817" X-Mailer: WebService/1.1.15739 YMailNorrin Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:68.0) Gecko/20100101 Firefox/68.0 Content-Length: 8042 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk ------=_Part_554848_1619880971.1587504761817 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Autovacuum does takes care of dead tuples and return space to table's alloc= ated size and can be re-used by fresh incoming rows or any updates.=20 Index bloat is still not being taken care of by autovacuum process. You sho= uld use pg_repack to do index rebuild. Keep in mind that pg_repack requires= double the space of indexes, since there will be two indexes existing duri= ng rebuild processes. Regards, Virendra Kumar On Tuesday, April 21, 2020, 2:26:11 PM PDT, Kevin Brannen wrote: =20 =20 =20 From: Michael Loftis =20 =C2=A0 =20 >>From: Kevn Brannen =20 >> I don't particularly like doing the vacuum full, but when it will releas= e 20-50% of disk space for a large table, then it's something we live with.= As I understand, a normal vacuum won't release all the old pages that a "f= ull" does, hence why we have to do that. It's painful enough I've restricte= d it to once quarter; I'd do it only once a year if I thought I could get a= way with it. Still this is something I'll put on the list to go research wi= th practical trials. I don't think the lock for the vacuuming hurts us, but= I've heard of pg_repack and I'll look into that too. =20 =C2=A0 =20 =C2=A0 =20 > Why do vacuum full at all? A functional autovacuum will return the free p= ages to be reused. You just won=E2=80=99t see the reduction in disk usage a= t the OS level. Since the pages are clearly going to be used it doesn=E2=80= =99t really make sense to do a vacuum full at all. Let autovacuum do it=E2= =80=99s job or if that=E2=80=99s not keeping up a normal vacuum without the= full. The on dusk sizes will stabilize and you=E2=80=99ll not be doing a t= on of extra I/O to rewrite tables. =20 =C2=A0 =20 =C2=A0 =20 Sometimes I need the disk space back. It also makes me feel better. (OK, th= is may not a good reason but there is a hint of truth in this.) What this p= robably means is that I need to get a better understanding of vacuuming. =C2=A0 =20 Thanks! =20 Kevin This e-mail transmission, and any documents, files or previous e-mail mess= ages attached to it, may contain confidential information. If you are not t= he intended recipient, or a person responsible for delivering it to the int= ended recipient, you are hereby notified that any disclosure, distribution,= review, copy or use of any of the information contained in or attached to = this message is STRICTLY PROHIBITED. If you have received this transmission= in error, please immediately notify us by reply e-mail, and destroy the or= iginal transmission and its attachments without reading them or saving them= to disk. Thank you. =20 ------=_Part_554848_1619880971.1587504761817 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Autovacuum does takes care of=20 dead tuples and return space to table's allocated size and can be=20 re-used by fresh incoming rows or any updates.

Index bloat is still not being taken care of by autovacuum process. You=20 should use pg_repack to do index rebuild. Keep in mind that pg_repack=20 requires double the space of indexes, since there will be two indexes=20 existing during rebuild processes.

Regards,
V= irendra Kumar

=20
=20
On Tuesday, April 21, 2020, 2:26:11 PM PDT, Kevin Brann= en <kbrannen@efji.com> wrote:


From: Michael Loftis &= lt;mloftis@wgops.com>

=20

 

=20

>>From: Kevn Bra= nnen

=20

>> I don't parti= cularly like doing the vacuum full, but when it will release 20-50% of disk= space for a large table, then it's something we live with. As I understand= , a normal vacuum won't release all the old pages that a "full" does, hence why we have to do that. It's p= ainful enough I've restricted it to once quarter; I'd do it only once a yea= r if I thought I could get away with it. Still this is something I'll put o= n the list to go research with practical trials. I don't think the lock for the vacuuming hurts us, but I've heard = of pg_repack and I'll look into that too.

=20

 

=20

 

=20

> Why do vacuum ful= l at all? A functional autovacuum will return the free pages to be reused. = You just won=E2=80=99t see the reduction in disk usage at the OS level. Sin= ce the pages are clearly going to be used it doesn=E2=80=99t really make sense to do a vacuum full at all= . Let autovacuum do it=E2=80=99s job or if that=E2=80=99s not keeping up a = normal vacuum without the full. The on dusk sizes will stabilize and you=E2= =80=99ll not be doing a ton of extra I/O to rewrite tables.

=20

 

=20

 

=20

Sometimes I need the d= isk space back. It also makes me feel better. (OK, this may not a good reas= on but there is a hint of truth in this.) What this probably means is that = I need to get a better understanding of vacuuming.

 

=20

Thanks!

=20

Kevin

=20
This e-mail transmission, and any documents, files or previous e-mail messa= ges attached to it, may contain confidential information. If you are not th= e intended recipient, or a person responsible for delivering it to the inte= nded recipient, you are hereby notified that any disclosure, distribution, review, copy or use of any of the infor= mation contained in or attached to this message is STRICTLY PROHIBITED. If = you have received this transmission in error, please immediately notify us = by reply e-mail, and destroy the original transmission and its attachments without reading them or saving t= hem to disk. Thank you.
------=_Part_554848_1619880971.1587504761817--