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 1otZ2w-0006bC-9H for pgsql-general@arkaria.postgresql.org; Fri, 11 Nov 2022 18:46:34 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1otZ2t-0008Rc-KQ for pgsql-general@arkaria.postgresql.org; Fri, 11 Nov 2022 18:46:31 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1otZ2t-0008RS-6Q for pgsql-general@lists.postgresql.org; Fri, 11 Nov 2022 18:46:31 +0000 Received: from mail-oi1-x22e.google.com ([2607:f8b0:4864:20::22e]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1otZ2p-00046q-Kd for pgsql-general@lists.postgresql.org; Fri, 11 Nov 2022 18:46:30 +0000 Received: by mail-oi1-x22e.google.com with SMTP id h132so5707052oif.2 for ; Fri, 11 Nov 2022 10:46:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:from:references:to:content-language:subject:user-agent :mime-version:date:message-id:from:to:cc:subject:date:message-id :reply-to; bh=0D5RKPKMruSLW6qyh8fKoppK1ab6mATMHMhtEoFYJ2k=; b=HePeItow/WsfH8CzMF8Yo2C6947ak/3adiGKHCKgORA3jIJ+91jZ7Aanyo7xtcLM3f hwIJZA39WlrYCWTthS2wazcG3XBSTIislZzaAEOc9hVH6CsihwQy1DJ0mc3o19nyXxGa MYw460+TLSPdnfuD/l8ndrilb2MOSpZg2ElB9AEKjpTOL87QVOiAsXly0hFJFgiU3g4c GHl+/yMOAg9vrvRF9EKcsRR8N7dJQZ1YeWFQw9buC5fRhdMaKy4198gSPMiW4hM169qV X1cnHPBGpWPnVNcJykEpEvPrUHAVyU9bniFiLcZQVs+FVqm2GdCyyXmobjpeCDPXX35L KHUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:from:references:to:content-language:subject:user-agent :mime-version:date:message-id:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=0D5RKPKMruSLW6qyh8fKoppK1ab6mATMHMhtEoFYJ2k=; b=LhbJ07XnorfYngK35fpJS9aJhGX93mnHND6hlo8r+eYN/qNoBCnHKX7uZYONxoxWub ZG9puNLNSyjioTASsH9rnkcB312wcSmqXkb2Oz9SR3ifVkk+U4rGyZrGMDbB7vdgDUT0 LjJxwaY3WwNoQxZ0uOFF3Z2yb8s2eFJSLRNv1h0SowcXSJVpOoj6HrAO7e+Ylz9JZ4nM Z/F3A920m6L9rtJdPmuI4+vWsqEtd1kDgPAAWRH8KKodQXk9vMVw+Ws6d06n3soikpyf nNLA1GtYntMhynmhAnCBWO9qgV1lWQa0kTU4g0XtD3V0lnkbs/ZfUIYkwOjMzJH40R7j Vcjg== X-Gm-Message-State: ANoB5pnURPfNK//gPzty3qiaVMIG841tmZM4rLZtgM2e59J7t+wBIud/ +XBEGKY8xoXkvW2odVxpYkUFk3rF/xc= X-Google-Smtp-Source: AA0mqf4pp0wo7yygskph/jkMp5JJkPexFDrONCx0KTSIlhKuXlpe76fYPK6TSb4NWAwPSUsnxLWyTQ== X-Received: by 2002:aca:eac1:0:b0:35a:308f:9c07 with SMTP id i184-20020acaeac1000000b0035a308f9c07mr1405350oih.242.1668192385449; Fri, 11 Nov 2022 10:46:25 -0800 (PST) Received: from [192.168.88.10] (ip68-230-234-148.no.no.cox.net. [68.230.234.148]) by smtp.googlemail.com with ESMTPSA id r5-20020acaf305000000b0035a921f2093sm1132777oih.20.2022.11.11.10.46.24 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 11 Nov 2022 10:46:24 -0800 (PST) Content-Type: multipart/alternative; boundary="------------6GHt8GKuYcHQ47FCsK8BFQE5" Message-ID: Date: Fri, 11 Nov 2022 12:46:24 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Subject: Re: Table : Bloat grow high Content-Language: en-US To: pgsql-general@lists.postgresql.org References: From: Ron In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------6GHt8GKuYcHQ47FCsK8BFQE5 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 11/11/22 11:09, Alexis Zapata wrote: > > Hi all, > In postgresql 13.5 Upgrade to at least 13.8.  (13.9 was released yesterday.) > I have a table (size 3.1 GB) and in this table occurs near to 200 updates > per second, after 2 days the size table is 7 GB and bloat grow to 45% and > the query operations are degraded. vacuum runs every 5 seconds over this. > but the bloat growth continues, to solve the > problem quickly, we have made a replica of the table with a trigger, then > a copy of the data and in a > transaction we rename the table, but it would not be the best solution. > Some suggestion about stop this size increase or parameter to setting up? Manually vacuum it on a regular basis. Think about partitioning it on PK boundaries; that way you can vacuum each child at the same time. -- Angular momentum makes the world go 'round. --------------6GHt8GKuYcHQ47FCsK8BFQE5 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit On 11/11/22 11:09, Alexis Zapata wrote:

Hi all, 
In postgresql 13.5 

Upgrade to at least 13.8.  (13.9 was released yesterday.)

I have a table (size 3.1 GB) and in this table occurs near to 200 updates per second, after 2 days the size table is 7 GB and bloat grow to 45% and 
 the query operations are degraded. vacuum runs every 5 seconds over this. but the bloat growth continues, to solve the 
problem quickly, we have made a replica of the table with a trigger, then a copy of the data and in a 
transaction we rename the table, but it would not be the best solution.
Some suggestion about stop this size increase or parameter to setting up?

Manually vacuum it on a regular basis.

Think about partitioning it on PK boundaries; that way you can vacuum each child at the same time.

--
Angular momentum makes the world go 'round.
--------------6GHt8GKuYcHQ47FCsK8BFQE5--