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 1wNoRh-00157S-2W for pgsql-hackers@arkaria.postgresql.org; Fri, 15 May 2026 09:03:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wNoRg-00HIeQ-0P for pgsql-hackers@arkaria.postgresql.org; Fri, 15 May 2026 09:03:00 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wNoRf-00HIeH-2Z for pgsql-hackers@lists.postgresql.org; Fri, 15 May 2026 09:02:59 +0000 Received: from mail-yx1-xb136.google.com ([2607:f8b0:4864:20::b136]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wNoRd-00000000fuj-3Xgw for pgsql-hackers@lists.postgresql.org; Fri, 15 May 2026 09:02:58 +0000 Received: by mail-yx1-xb136.google.com with SMTP id 956f58d0204a3-65c5361142fso11646488d50.0 for ; Fri, 15 May 2026 02:02:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1778835777; cv=none; d=google.com; s=arc-20240605; b=GdFZDTCpb5UHU+UNpZ8bhtVcf0NgJZEkxesvzMMwVqjhQys7REN7w/tclnJKKTYRB3 7eApFscMsxgBch0nxhmYc4hqZyBVjWToie0NVrmkenUwsxl942XO+cOzjGX43WXNKCPi uh0k5ANZB4704WYk5BLE3jUX8KifuZ2nNvuXhsHnkrygOKC2VcOF6ED7cH7Kihu5VT9C gDjEvlY/ud4WPpdMdHCj8sqX3DJOahp41EUM67cv7ADdt0siMP3/SgbOy134D+racvp4 La7BWnedm/tNhy7btEisz8jPePG0a27QFPB+YnYmpNktCqcRa0e7L+jPFafYO7v16G3F C33Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=to:subject:message-id:date:mime-version:references:in-reply-to:from :dkim-signature; bh=XkTaR2C78/JyoukmsSg7o4L5LWtW+h4uP1m+Jcg0M5Y=; fh=nwNxTtLLPTU0ewfLM7SSbrjMajMl+wwnFkCY/fi90vE=; b=hsO4k8p74Xn0F9atFDWGdNahuKxPGYAe42ttlmeqQ+haQdi2PW7Bje3yfQGn8C1Tp2 bzqZn+GixcaV4b6yO8/AyassdbtnkHRHtbuI53G086sK0iKHwOdjLVBoqfMSZ9MJS8zr WUl2i8vpOmnhcuEThRpR7a9a398rrCW64v0ppEgZ6jzZXPlBGO5VG9s8wIzh/Kkfsyc0 PNj+uU2iTJMaw+kdP9hic4I4NcLRA1L90hQtdNk95K4iakMLSqAE4sL/r9HcegfzTPVV jc8uBce4IGBDfsJC29icsu77jopGbUaYZMWHSzQQpWIg/BGoysdG10cR002ng7VMDirR 1rvg==; darn=lists.postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=percona.com; s=google; t=1778835777; x=1779440577; darn=lists.postgresql.org; h=to:subject:message-id:date:mime-version:references:in-reply-to:from :from:to:cc:subject:date:message-id:reply-to; bh=XkTaR2C78/JyoukmsSg7o4L5LWtW+h4uP1m+Jcg0M5Y=; b=D9sxM5wlTpZTRX3YUmKLKPxOb9SUazGiQf3tKcEYrOlXA6rc8YLx+jAPXljzj+Dbco cuYswDkCLNM+nYElk2jn/Brh8h3k803z1KvGFMk+E82zl53YnoSqKgcLdHewkj5mfxct 06LJQeXj4oRw7PtkBh8S7t4ABuxxCDWh/2eqs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778835777; x=1779440577; h=to:subject:message-id:date:mime-version:references:in-reply-to:from :x-gm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Nt5Aq+HFFS2Qpm8roMjMBp9wTbHu9Sx4bYMlGE0ImmPCqjOS0xb50 4KiWf6OBPhXVdGOuE+Iw2XJvg+yD4SgHLK+It8zlesesuihWRCO7iw0w2DRedJw7ID9fNEqKUlO Xiho= X-Received: by 2002:a05:690c:c513:b0:7b4:f43f:1a23 with SMTP id 00721157ae682-7c95d1d5de1mr31898167b3.34.1778835776506; Fri, 15 May 2026 02:02:56 -0700 (PDT) Received: from 298783833264 named unknown by gmailapi.google.com with HTTPREST; Fri, 15 May 2026 04:02:55 -0500 Received: from 298783833264 named unknown by gmailapi.google.com with HTTPREST; Fri, 15 May 2026 04:02:55 -0500 From: Zsolt Parragi In-Reply-To: <20260515140302.5a532dfa246817a0b28854f7@sraoss.co.jp> References: <20260324151133.7940a5c1f2ebd594d54da481@sraoss.co.jp> <20260325012847.e026ba1860c07288efe3e97d@sraoss.co.jp> <20260326192203.e6dbb8d80f8d27dc15ceee59@sraoss.co.jp> <20260327163549.b5df519c0099970ddbb3412d@sraoss.co.jp> <20260328161802.f35b5a3e739566ffd7c1053b@sraoss.co.jp> <20260413170551.5ec43ba5a2c848f0d46c6a0b@sraoss.co.jp> <20260427203207.32aa6ca37f2a18a05508dfda@sraoss.co.jp> <20260515140302.5a532dfa246817a0b28854f7@sraoss.co.jp> MIME-Version: 1.0 Date: Fri, 15 May 2026 04:02:55 -0500 X-Gm-Features: AVHnY4IE4av2hs-2fr67NTvvRi7Nj3lKQulDXk7wCdhIfRqNqqMW8g9ieDAnwfE Message-ID: Subject: Re: Track skipped tables during autovacuum and autoanalyze To: pgsql-hackers@lists.postgresql.org Content-Type: text/plain; charset="UTF-8" X-CLOUD-SEC-AV-Sent: true X-CLOUD-SEC-AV-Info: percona,google_mail,monitor X-Gm-Spam: 0 X-Gm-Phishy: 0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > If the table is dropped, there are no stats to update. right? Ops, right. I focused too much on "all warnings should be visible in the statistic, so the sum of warnings and statistics should match", but of course that's not the case. > However, I'm not entirely sure whether this behavior is always guaranteed. > Could anyone clarify this? There's another different corner-case if I move the injection point inside pgstat_report_skipped_vacuum_analyze, after releasing the syscache. If the drop happens at that point, we insert an orphaned record into the statistics, and it will be visible with the internal functions (e.g. pg_stat_get_skipped_autoanalyze_count). It is still invisible in the pg_stat_all_tables view, but now that I've looked more at the code, I think internally it will stay there permanently, even surviving pg_stat_reset? > RangeVarGetRelid() still returns the table's OID Yes, I also reached the same conclusion, I started testing because I tried to see if I could break the double relid retrieval by some scenarios (alter rename + create, drop-create etc), but it's not possible. The ereports can execute CHECK_FOR_INTERRUPTS, but that never calls ProcessCatchupInterrupt, and because of that it never runs AccceptInvalidationMessages. And that's when I noticed that the warning isn't visible in the statistics at all, and got distracted...