Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wzwPb-004Llz-2C for pgsql-hackers@arkaria.postgresql.org; Fri, 28 Aug 2026 13:14:27 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wzwPa-007cxf-1B for pgsql-hackers@arkaria.postgresql.org; Fri, 28 Aug 2026 13:14:26 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wzwPa-007cxX-02 for pgsql-hackers@lists.postgresql.org; Fri, 28 Aug 2026 13:14:26 +0000 Received: from mail-qt1-x82d.google.com ([2607:f8b0:4864:20::82d]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wzwPX-00000001isF-2AXx for pgsql-hackers@postgresql.org; Fri, 28 Aug 2026 13:14:25 +0000 Received: by mail-qt1-x82d.google.com with SMTP id d75a77b69052e-52fa9c055b5so14779411cf.1 for ; Fri, 28 Aug 2026 06:14:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1787922861; x=1788527661; darn=postgresql.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=OuyF2LscFzjnLKIgrlSbQejSqgrtTur16+NU8oD5cTk=; b=XZ3NXmeThoIahQuaovEeb1XOmirvFkgsJTX/ev+vQ3GUJl5vGUS5dPNdC6EtyFS0Z0 OMagqiJgrDzzmjpOBRAbPXYWiXqrR+xc3szVlBdEV17Hcgjf9w6EKkWuc2nvIj7VFTs2 WAiOtgmMp2lXMUu1LMCOwTF2g/gVKRZcJxP/TQAuxKrHVdBfH+FaYBc0BP4RrEuq6aS+ VmIhgU5w1NQjTT8Zso7PYZ8M7GwjoC6UugN4bFG9NS6Z/qEalZBO6G9wZXKrgsaHcG+Q 2XIPmFiTciYeBibY40P4wrhtaHQZlypcKLMwsPpSHdzDIZ1OvWMtGGTLk9htZy9vlwuU Z9Sg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1787922861; x=1788527661; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=OuyF2LscFzjnLKIgrlSbQejSqgrtTur16+NU8oD5cTk=; b=IubdTJjpyRiwH9AJl3ritT+Kbdl8yT/vUjvgZswxiRZrbw0O6RUcbc8LjdCI4vbzwp 6gWg2QDrZLfFRM8Da3jCVuCLMOlwoD64Wd17dqNgolQq5f7Bd/osva4+fMlhzLRBBWg/ EiT/+0P/sgf9RUuCE0q0rlkeqyDZHVANnf+dKV4hvvwSn/McYhMO+27Sc2TKB+Yn16/Z Vl20aoSReF/aPquZRRTS1SsRW4ApRb2rLXCZHyzG71HS5BNfu5rlynYFOiU2I1L6f6Tu xIZF1/OxgOgiql3Xy6IUc4BHPej+2ttokjaRM0ZGF1B+zfIp6i+insxyaHomjcNHGyqg ZKdA== X-Gm-Message-State: AFuF++kd/Bm8hi5wikhE01Kt8WptcyfM2sc6WkOKkVUPKu/1/xvLtvQ4 LqYzUCWuvjZ9ERkiMf2EvSN7DsyfOXBGshv2lGa5RCyLEXur8loY/aOw X-Gm-Gg: AR+sD10xEO5dPlw7dOVtph/+IEPQlaqKCnUAT8JpfzfsKf/+x5k09OamHX3ClZ6KBJY 49aYm1OIGytdGtli5ibK+qa8pJoYl2RygqaHP6NTTpMFjS4hcO9qGAlzukcoPS2C5yYBG5kMjjY W2Hui+m9tyRiPlL42eyHyZTDDRJH6Cw6ZQCTV9rM8lSx9vVIsUtNWY8PlHRJ1YPL/X7URCZIZXl MeFYhArRlKgTl/2W5NJIwq8Ii5v/O/u5wUI6lbVdpz1P4bSlixiTakAkQHlPkrxUe9GP36QpegB GSVjBxjFoYgjMCAD9KHg9kfwZKIJqdDfJjjjtny96HRutks5/q7SxIWHbEsC1ZmAjJZKmfnTcp1 FklI3f25waPqB+BYfupOzMJnl22EYds1dxnqqiDergKRTh26UXodxzGV17QOoWyAfogy+twRsES eEigw5vwbnXnIV92M8dIa6Ytzg3ocFtwxjiujiDz4TuIa5bDJFqq+woiBja2SMLh5CKnBfNBED/ xlEqjX6IBRg1j182AVdHLb7AEo1rR6o8dUgrT+PFGM1EWG72bOdUX+75b0F4t7E1+7pLxJs/x1I ozEADWTk3XuckxY= X-Received: by 2002:a05:622a:550a:b0:52e:f66:f1a5 with SMTP id d75a77b69052e-52fb8e86740mr78761871cf.5.1787922860533; Fri, 28 Aug 2026 06:14:20 -0700 (PDT) Received: from nathan (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-52fbe5a6422sm12547841cf.12.2026.08.28.06.14.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Aug 2026 06:14:19 -0700 (PDT) Date: Fri, 28 Aug 2026 08:14:17 -0500 From: Nathan Bossart To: Masahiko Sawada Cc: PostgreSQL-development Subject: Re: pg_stat_get_autovacuum_scores ignores the main table's reloptions for TOAST tables Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, Aug 27, 2026 at 03:42:23PM -0700, Masahiko Sawada wrote: > I found that pg_get_autovacuum_scores reports wrong values for TOAST > tables. In do_autovacuum(), we fall back to the main table's reloption > when the TOAST table has no reloptions of its own, and > table_recheck_autovac() does the same. However, > pg_stat_get_autovacuum_scores() only calls extract_autovac_opts() and > passes NULL when the TOAST table has none. > > So the view computes the TOAST table's scores from rht eGUC defaults > whenever the user sets autovacuum_* on the main table without setting > the corresponding toast.* option. Here is a simple reproducer: You're right. I will work on a patch for this and get it fixed ASAP. -- nathan