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 1fpC48-0005Ej-DC for pgsql-general@arkaria.postgresql.org; Mon, 13 Aug 2018 12:35:20 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fpC46-0008OM-5n for pgsql-general@arkaria.postgresql.org; Mon, 13 Aug 2018 12:35:18 +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 1fpC45-0008Nr-Hh for pgsql-general@lists.postgresql.org; Mon, 13 Aug 2018 12:35:17 +0000 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1fpC41-0001pW-O0 for pgsql-general@lists.postgresql.org; Mon, 13 Aug 2018 12:35:16 +0000 Received: by mail-wr1-x444.google.com with SMTP id u12-v6so14127055wrr.4 for ; Mon, 13 Aug 2018 05:35:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=0wQnKKKAuTZ9vkzMjvjuLf+0KzTbu028K6+JaPXXxOk=; b=UvXzvp/ttJ3HCtP2j46Qc6uR+FxMuJfgkk0Sr/IN6dgFinbLKvoX40d1wrosd7KRtK 2bGuXRhgT0SPpMucvloM1ZAb0BMz7oIxNeujac282X9l5jcZzAJl5djcYy+8U457nFXk EizIPfOc8boRhrrAvzfTppGAqoHipwocGnXehUpUs45lh+4CHKq2ox0XvfPeS87hoSYw NN7EN+ubq+7LBiQK07r/P8zzPqtEy7w6H7iH+S9U95ngeN1rAWIPTKiDg/MCdECWFaFz +ulz3ylMnmKciKkgd0Oe1MLS5Re+YDCTXkPu7pv1ZKZk9ArUu/v3TulXKFrDW4arTnZp +zZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=0wQnKKKAuTZ9vkzMjvjuLf+0KzTbu028K6+JaPXXxOk=; b=H8MbnCpyAbV7nN6Z0GsoAv5GfHhxFijXNxxvu7xnEhHqAGpIQDxfm3wDF6U7FC77sg ztjxBEJ88zn9WECxA9t3t+nNsTOUeVIdSnztWyF41vJcT3IffvLtGyxn6sVz2aYezF/B GLYzX9LcSKzPWs+C+j1GoqcEW7cWZQQlUZ+GuPr5Iho6TwRAMXLvIFWK2yGnfPhms/Ky 03x9pbebI6D1KwxMuJ1lyKZw4PfhdyTfUEWi574kCh5o8yquGLZ2TEBnxk93K6d6umHy az/DmsxiYXHYUA5vDdkMQIzNxLbITKIeiTQLducLR0UY31Q36NLqwVYdBA88/oKV9Vam BN6A== X-Gm-Message-State: AOUpUlF2RiPlF0V7PPU/U2aTph9WmNuGffqxrBoM+pGXj/9JUNAPhG3o 5418dfberwCmhSsx4MZmoNZ8qlhZj235M22GlGgDK6q/njYDkBpc1agNjIFInjZ0EQYyj+sMIdz H0W9CXUtGseSOWqFvM2Uu1KfY+Xre7HiDxauE+HtmX4mjKoqwXy4NrtPdXVZia8MWKjFlpP29Or xe3XTw1WdD0Utet3bbsMI= X-Google-Smtp-Source: AA+uWPzr5MqbKAzUFEOwSlIpUhUemmzJyipXnto1foZJHXK4fYwvVDheK4RhFOMvtLoFHW7prdAq6A== X-Received: by 2002:a5d:4f0d:: with SMTP id c13-v6mr10218707wru.114.1534163711532; Mon, 13 Aug 2018 05:35:11 -0700 (PDT) Received: from [10.137.2.21] (static-84-42-175-93.net.upcbroadband.cz. [84.42.175.93]) by smtp.gmail.com with ESMTPSA id w204-v6sm12926061wmw.5.2018.08.13.05.35.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 13 Aug 2018 05:35:10 -0700 (PDT) Subject: Re: is there any adverse effect on DB if I set autovacuum scale factor to zero? To: Raghavendra Rao J S V , pgsql-general@lists.postgresql.org References: From: Tomas Vondra Message-ID: <64b01682-49bd-8577-45de-0114fd6af372@2ndquadrant.com> Date: Mon, 13 Aug 2018 14:35:06 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 08/13/2018 11:07 AM, Raghavendra Rao J S V wrote: > Hi All, > > We are using postgres *9.2*  version on *Centos *operating system.  We > have around *1300+* tables.We have following auto vacuum settings are > enables. Still few of the tables(84 tables) which are always busy are > not vacuumed.Dead tuples in those tables are more than 5000.  Due to > that tables are bloating and observed few areas has performance > degradation. > You don't say how large the tables are, so it's impossible to say whether 5000 dead tuples is excessive or not. IMHO it's a negligible amount and should not lead to excessive bloat or issues. A certain amount of wasted is expected - it's a trade-off between immediate and delayed cleanup. If you delay the cleanup a bit, it's going to be more efficient overall. It's also unclear why the tables are not vacuumed - it may easily be due to all the autovacuum workers being constantly busy, unable to cleanup all tables in a timely manner. In that case lowering the threshold is not going to help, on the contrary. regards -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services