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 1jkqHq-0006hu-6X for pgsql-general@arkaria.postgresql.org; Mon, 15 Jun 2020 14:40: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 1jkqHI-000573-7i for pgsql-general@arkaria.postgresql.org; Mon, 15 Jun 2020 14:40:00 +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 1jkqHH-00056w-Ri for pgsql-general@lists.postgresql.org; Mon, 15 Jun 2020 14:39:59 +0000 Received: from mail-ed1-x542.google.com ([2a00:1450:4864:20::542]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jkqHB-00037C-4y for pgsql-general@postgresql.org; Mon, 15 Jun 2020 14:39:58 +0000 Received: by mail-ed1-x542.google.com with SMTP id p18so11689466eds.7 for ; Mon, 15 Jun 2020 07:39:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20150623.gappssmtp.com; s=20150623; h=message-id:subject:from:to:cc:date:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=8qy9QrmT6lWSdVNG79RGIVbVx9cNDBF7tdHtgJvH7HM=; b=CX/mgAMmjaEwBeD+FZg9Gul2V873vUpcx22Vm4kghGW/rYpAW16/3zPHDFG27oj7zB 5R2xMTxVAm50LwhsBVEwNz9Byy+AFHXNev6H9MNpuPJpcRTH0fFmDAe75zGKme21KwGr NyuSG7gcvy/Tlf7Cid+U6BDqJhbyOLSFpHTtftPdKas83NQO2JzRtEly+Fs99oHAsH+z iSpdJ1wftyT1qPxo6maxO1Cr0mGG1/ptJSGOYfN4BRC8gG19foCAMSHwllwl2WhTp0kl 6Ld6wztClBJouBNSMs+Fq/UQJcOrkWjOrWNQ29I04BA043ktYJGk0VODd3E82WhKRdnx H7JA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=8qy9QrmT6lWSdVNG79RGIVbVx9cNDBF7tdHtgJvH7HM=; b=AsKpSDafqTbcg5gbX+wMoP6icpGH9v+8H8SpfETuRgylHkBs2uxOHq9XAv41rT1O3p uCvgimAnC+YFll8RdnKxMz/bdrze4aFR8BN19Xa54ikbSuNM6jdgWCyOUFKbmd4T/94P emAj2bWpAhe1su8bhZqKBY8QD7HRdpnhNLnO6L2WEInrrZeULH0CugdDm0o8NMZ1oR8o m30l/k3A5I/xBghPHytSuOYbcdzZp/uC+laX++Wrb/axeufjwnXTXcpF4+XkE6Q8uRpN +q49hh96uZoywrvuhWG4qoD9hQRlz9Uyo5+XZmTyJTvuDbh47a6WVaD6Yi1siMnX7u0D EPMQ== X-Gm-Message-State: AOAM533moiySrs0AypK+OpKQKiG0cyg/AetCyBbawr+9WKCgt8/O5Ovt 6YHjkc5+iyECxgkDy2ETbe224w== X-Google-Smtp-Source: ABdhPJzfE1sZZ6Z72c5ZgBIvyvJ3U5LUGpwJxc+9hVLVbyfveaAs1sLB+3YHiBM56fWRdtGGA6alBg== X-Received: by 2002:a50:b0a1:: with SMTP id j30mr24431234edd.387.1592231991620; Mon, 15 Jun 2020 07:39:51 -0700 (PDT) Received: from localhost.localdomain (217-149-168-120.nat.highway.telekom.at. [217.149.168.120]) by smtp.gmail.com with ESMTPSA id bt11sm1685007edb.48.2020.06.15.07.39.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jun 2020 07:39:51 -0700 (PDT) Message-ID: Subject: Re: TOAST table size in bytes growing despite working autovacuum From: Laurenz Albe To: Kristjan Mustkivi Cc: pgsql-general@postgresql.org Date: Mon, 15 Jun 2020 16:39:50 +0200 In-Reply-To: References: <78fa342abe358a96601c675729dd1eff0fe5481d.camel@cybertec.at> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.32.5 (3.32.5-1.fc30) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Mon, 2020-06-15 at 16:42 +0300, Kristjan Mustkivi wrote: > > You should schedule down time and run a VACUUM (FULL) on that table. > > That will rewrite the table and get rid of the bloat. > > But in order to avoid the situation happening again (as it will with > the current settings), I should likely make the autovacuuming on the > TOAST table even more aggressive via > toast.autovacuum_vacuum_scale_factor tinkering, right? No, the correct way is to reduce "autovacuum_vacuum_cost_delay". Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com