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 1wAvG0-000ZYn-0l for pgsql-hackers@arkaria.postgresql.org; Thu, 09 Apr 2026 19:41:40 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wAvFy-007aYp-1c for pgsql-hackers@arkaria.postgresql.org; Thu, 09 Apr 2026 19:41:39 +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 1wAvFy-007aYh-0f for pgsql-hackers@lists.postgresql.org; Thu, 09 Apr 2026 19:41:39 +0000 Received: from mail-pj1-x102c.google.com ([2607:f8b0:4864:20::102c]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wAvFw-00000000EeZ-3GQY for pgsql-hackers@postgresql.org; Thu, 09 Apr 2026 19:41:38 +0000 Received: by mail-pj1-x102c.google.com with SMTP id 98e67ed59e1d1-35d9f68d011so902321a91.2 for ; Thu, 09 Apr 2026 12:41:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1775763695; cv=none; d=google.com; s=arc-20240605; b=A1wZbza2f16CzMBl9uaVwUNK+NcaAJIzX1Vy7Ywee6Zt8jl+ZsrxzWYXFqzUGxUkr7 XHpWW4jMSvyUEtcE182Le8koJjnXnafLeGeRNuD6Mush3bWfIR5EjW9zVVT4CGhrTAb6 xR/l9184Z3PZF3iLmBrfN2VvCrpYERu3RuRf0LVIqRwIMusVWjgbEd5n3nSHBH9nbTDe Xb/kXlBCkDLNzR6Udioru2hqXdDwsioDL1ce5NpNTuoD+31ebIeNDw2PX3PR5MH/UxUx oZLq/3tiZYItT4GUGZksoI6LiVQOXdFRfjl/1Frid6dup6oI7L5l/pc1YNQzzKkKOArE X9yA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=NDEwBT9jaq5wQ12+rINnIkinNGPKpTJFbuITVR6w604=; fh=ETD5Ub5j/Cdgdh3TbVQM3zoEljcpSQvKnYYV+mJQITo=; b=QX53zQpgX2QbXhXr9J1Ghz3mpe60m03swaFrhIzD4FhnK1i1j3iw0ES+33L277iPVf 9zF9y9qkj/qJ5XVwldeTui+ZuIJ16oezIzpwkNVG+r/nzhT9gV7vxhBUvpT/LhpiUL3J UZE6Khwx3XYyTEVErsNzCZl9MRFUyITYUDvM2YUrJlxMR469Pg8TIfOeMkr4RYcO9ykc 7sA6GZg7oIN0eo2tUMPE9HqoftCNAOws7LhE97nCL8s3nGikGXAocEYupQE1mIM489bz dI47dqKM4VYrOoalVXjTMggsVr33K2Y78Dd6aIuW0oa41ev12mNpTbCyjWSgNk8PXTgM 82bQ==; darn=postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1775763695; x=1776368495; darn=postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=NDEwBT9jaq5wQ12+rINnIkinNGPKpTJFbuITVR6w604=; b=lBHLRaDxhXIwukAT3zVMh9c4+d5y4TekTI2Gf4lRIRrF3x2Tfa+2BLaFjvLCzDAOhM v3mEw+LGoegwDXlM1XR3GXmN4yWz+eESLI8nLAy0DGbCU4IRKObMOFz4XTMl48wWM5Wq jH5ivvZ1V22IfQJnpKKR1jxkXJm58k8LnHOLHr1lZ0BHDyqt4yUdBcFZ1QOzdAjPvfY/ dtWKkDhppcwN0QiFkIZgXo3WBiBjZl+rnNWtqOTJSgQrCQgE0heTbLjEC5F+b9ENv1kJ Npj/F7mr65OPgRSUzBvlgqPvYuKi3YLZF4i7fChE3Gz650bXXK09ItaMUI+h7GOR3fOI KXMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775763695; x=1776368495; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=NDEwBT9jaq5wQ12+rINnIkinNGPKpTJFbuITVR6w604=; b=fnG0+ss6EaUJuIqn9GRzS0MOxMHMO49aX2yLUMjIfY/EplUCwDetKU+2ntQIWxO0QM dZwE6reNQ4WQ4pvwhep4s75ErqtAKB88eWM7t+LWuQPJYTOn5eYBLAhWNA4T9JfRDVdq bhSwMgT31vTH8V6T9mAMAJVKwm3JVoEdoAfZCDTHf0W42j2tuAar7AcTXO3nRwhMKgMH O02u9qQAeDg4k+5qmd3CsRsJrxPQd9l37u2F/dsNv/p027CR2He+KA/8QwmDaG3AI91o Ufkv9loM2/q14vgXpRnIgsfhz2VnC7EBx5dQndRt+MCqhG30TUzo05ik5Z9girlzj7DB HwGg== X-Forwarded-Encrypted: i=1; AJvYcCUWEumX4UrYekbHgncoBmhnhJeVKZEeUsN1fgrYwgmUQvNEvOTTXhXMJociq6I84wTJsosUWSwfDkJNBCD0@postgresql.org X-Gm-Message-State: AOJu0YwZQU7xHauHOydFXVwzEir5TjIDZL56pLteDZfICEVy567qQGIq O3rtnEwsl4Utz5E1dDR3k41ly0HzaivfvRq0IFlZdAHo+aYvn/BwYJ59UzDU9ecfMGTlLmO05h4 T/YXqdf4cElEdLtzg/6HDtU5eVcOlY5k= X-Gm-Gg: AeBDiesLqENhJ5bzUwG9c/K7i0PVQUoLnhM5qyJg/rxJX4/V5tnClmRVFSuXzrc5wDY MtHyplCeL564IoEl2X2g27zuqn2GGubC3HWheLnwU/F/FaQ6q7ZmUD/H5Lx7ez9vgUCH9gizxWp ED+b+kL5uPQ7iaL1aOuhgDV4m1Y4bpit+gUE05XMLnFKeb8I8yvyQDvMhqczwLju6/dXVEfLNMk NpINFrzk1yjkroXmG8tIEYRA/dgGYvHrjyJRWpiQmaSKeknJyeZGH6cULxRBR81pUvmXAjPFyiE baWAXA== X-Received: by 2002:a17:90b:4d0e:b0:35b:90e7:c44f with SMTP id 98e67ed59e1d1-35e425381c6mr368428a91.7.1775763694711; Thu, 09 Apr 2026 12:41:34 -0700 (PDT) MIME-Version: 1.0 References: <525d0f48-93f7-493f-a988-f39b460a79bc@gmail.com> In-Reply-To: From: Masahiko Sawada Date: Thu, 9 Apr 2026 12:40:55 -0700 X-Gm-Features: AQROBzAbUwybEXJUeH-7P-YfatColWkbrK822QpNfITFy2NwqfyA1tSdPaR8M3I Message-ID: Subject: Re: test_autovacuum/001_parallel_autovacuum is broken To: Sami Imseih Cc: Alexander Lakhin , pgsql-hackers , Daniil Davydov <3danissimo@gmail.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, Apr 9, 2026 at 11:32=E2=80=AFAM Sami Imseih w= rote: > > > The root cause seems to me that it's not guaranteed that we can see > > the autovacuum logs after checking the statistics (i.e., > > pg_stat_user_tables) as we update the statistics and then write the > > log. > > > > One way to fix the test is to replace log_contains() with > > wait_for_log(). We can also remove wait_for_autovacuum_complete() > > logic altogether. > > +1. I was going to reply with exactly this. Attached is the fix. Thank you for the patch! I agree with the overall idea. Since we enable autovacuum log only the test_autovac table, just checking autovacuum log works as expected. I think we can simplify the test further by removing the logic around the av_count variable. Regards, --=20 Masahiko Sawada Amazon Web Services: https://aws.amazon.com