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 1x01eZ-004PGu-0t for pgsql-hackers@arkaria.postgresql.org; Fri, 28 Aug 2026 18:50:15 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1x01eY-008nyK-0V for pgsql-hackers@arkaria.postgresql.org; Fri, 28 Aug 2026 18:50:14 +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 1x01eX-008nyC-2p for pgsql-hackers@lists.postgresql.org; Fri, 28 Aug 2026 18:50:13 +0000 Received: from mail-qt1-x82e.google.com ([2607:f8b0:4864:20::82e]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1x01eV-00000001lIU-2Kul for pgsql-hackers@postgresql.org; Fri, 28 Aug 2026 18:50:13 +0000 Received: by mail-qt1-x82e.google.com with SMTP id d75a77b69052e-52cd38ddcdfso8845161cf.3 for ; Fri, 28 Aug 2026 11:50:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1787943009; x=1788547809; 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=lqtRySyiW3YiPHOLQIkM2KRPcxnwLGXJODk+bvlPRqw=; b=Ww40Y+x8CJPtDOIJaLz7IJ950n9ePzdc0ODgWX0NzvCGGhD0HM4xq21u7oggFyr21L uCuPcBhF3VpkSsIkCposN+VUvPqkB8x++hcXa9djRovr1OBfVkvE87tUbTfKRRK+KIGk jEFS9/sKwf0XBtpgj5kfC+8psoz3wscih1eV17I2Qj49KjgW2U8tww+iRwFKmB4tma93 Xvi4cRTqPA0mH5SjitqN4Oq34JTvgBKgv/FCPcSdHq8tjznUb4Ix9cuPtkxRod7AwaSm nOd/eUvTsw3509ZZWPQb0kRppP4l9q8+xMTsWGua4/uRBk+c4aLR/8gIB2sBBmzmnsYr sMsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1787943009; x=1788547809; 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=lqtRySyiW3YiPHOLQIkM2KRPcxnwLGXJODk+bvlPRqw=; b=ZiePftpn13mBkaHho7rIPqaOI8XE9bqK6FvAsjfpMJONcSaYd91q+tByOeeo9G7XnM DpaxRofOeUugb7fgUNfmLO7P7TEKnGor8pM6CILArIZqpXYuDnRkPvQzwuQxPZtMZl+X VOxLD/mJx4CyRBMOdcxPMiGUi5gNQaK5etQKfok6dvsFHpaocqq7deSO7wPiqffGA8l2 vjIsI59Q9/47LgXRyWdPl2vsvUf2/SQ7BzfOpZPnnStndQmlzYuG0cuk51dnquP0+NiA 7Ylsl6lKurFMUKWacPHEgwUJLM++ARTrTYhaihPwECnMNFtFHJvPD50IJbd/k+13Gvck /k3g== X-Gm-Message-State: AFuF++lX+2VxRxRN2Mhxtl6ian22igyixW2TTIhJ39uGiVBiBhca9Uby IVAFXkKs+9ZCX+yARRG32e8VTFTKx0gE0+uqOFOQFvyBUR835+ErAnKD X-Gm-Gg: AR+sD112NXRw19M2OWj0/Akzy627npg1wVOdyDzhan9YDwCTaF7v1oWKL+0jzXLQeMs sPC7ZZhY8aLHAduGBuEvp1kCft63rACE5iJ3EHAsakeDStAcA/t/i9Oj9V6uwnkIWR1j1pYHDrM ks7Nfx0m1/T2KoSqX6ZmgFMS3IEmABHPbNU8WNYbwY9TxxwrCoXVC0NOLpCCaTzENhwA5eXViLt e5wH+MwGIdYYMv1Tm2oPgkjRSeHvdpPmz+dWHufVdz0ndnkB6ViqC26l0zaH1dKF6bD3g7/t5o/ jAZHbcXGr7FvV0/6HGacv5pn9jwCwDHyHBIB7wU+W1KfKO0vPgvChMb7jYN+zOb+UM1Q/m7NBmU LJYC4K0f+HcUY8bAV3Da5H4Zr36UL26/W3CGIrnkuSvcbg3RhzNBbFu4guBK1K9GyR8NQ/a4ODf 8jV3RavSg2N2AfKukuL6PJTi/KS103p+ePC1iUYv7i99WbFQnBg3S4D72BHxwJ9ly2kJg9VjwIY 4I2sacAxEn2QtzfAF92aDwATGvN6G81Ey+yhHnLOmywsDcSQV1qJhZKMqArFrGrMxLNJT+ebOOr 8qB2bZ5vLEUtX27d X-Received: by 2002:a05:622a:1905:b0:52d:28f8:578c with SMTP id d75a77b69052e-52fb96013damr112734171cf.31.1787943008333; Fri, 28 Aug 2026 11:50:08 -0700 (PDT) Received: from nathan (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-90ce4460e56sm22025446d6.14.2026.08.28.11.50.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Aug 2026 11:50:07 -0700 (PDT) Date: Fri, 28 Aug 2026 13:50:06 -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 Fri, Aug 28, 2026 at 11:12:34AM -0700, Masahiko Sawada wrote: > Thank you for making the patch quickly! The patch looks good to me. A nitpick: Thanks for reviewing. > + if (found && hentry->ar_hasrelopts) > + avopts = &hentry->ar_reloptions; > > ar_hasrelopts is always true here, since entries are only created when > extract_autovac_opts() returns non-NULL, so the second conjunct is > redundant actually. Having said that, it seems safer for future > changes and keeping it for symmetry with do_autovacuum() seems fine to > me. Yeah, this is about what I was thinking. > Do we want to have regression tests for it? FWIW no test exercises > pg_stat_get_autovacuum_scores(). The only reference in the tree is the > view definition in rules.out. That's presumably why this went > unnoticed. It might be worth adding a test or two for this view, but I doubt it would've caught this issue. IIRC I held off adding tests originally because I was worried about test stability. -- nathan