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 1nKOSQ-0004gi-Ge for pgsql-hackers@arkaria.postgresql.org; Wed, 16 Feb 2022 17:51:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nKOSP-0001P8-7o for pgsql-hackers@arkaria.postgresql.org; Wed, 16 Feb 2022 17:51:13 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nKOSO-0001Oz-Rw for pgsql-hackers@lists.postgresql.org; Wed, 16 Feb 2022 17:51:12 +0000 Received: from mail-ed1-x530.google.com ([2a00:1450:4864:20::530]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nKOSM-0001Yu-D7 for pgsql-hackers@lists.postgresql.org; Wed, 16 Feb 2022 17:51:12 +0000 Received: by mail-ed1-x530.google.com with SMTP id t21so5249711edd.3 for ; Wed, 16 Feb 2022 09:51:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bowt-ie.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=2YYPiUN9JE8/X2BxOVbwjU7GPhODMuWz7qBrWZQsfe4=; b=rM7a4RQd53B2+E2GNUxmRbNHIAHEPpsEI+9lFMfk3q2sGoZrl5yFOZp2J82C9WHAIo Dh0vl154mBGMMX63oRMW7O3yB6pYFqfnxGtztDHNZx/WTpuajamVizp8tlbMBdg6oWjB pIYnSuyHf9QTYJpp79zemj550POTvUI7yvQedqsqZOTS8kOkI4iuY7B1B1vPZinSAW9X qT7ydM4x4+OtyL4dr6zTh3qYZO7pmEhqgd25L/zhcipOGqHTAgDT8DCRhccpyZ3W0j0r q2zqJhUTweNaI3v8XaeyyoMZ6rdQb8ejMkv6FbmuubmhZV9WZ+leuAgvydNzE2sLEZdT LsjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=2YYPiUN9JE8/X2BxOVbwjU7GPhODMuWz7qBrWZQsfe4=; b=jMC0VINXjJ7KMdwfyzSJV+S45bnz589qWy3bdHBqNEi48HYeWChFHmQmH6hvBjDQ5+ 8pk1tATjz/NRT6O5WpwjSB8P1aSIi6pI1KtU07cQ970Uon6M6PiFw6LTnIWhlYyeLzgt GyzkxC1PM6uocYxV5M2pZeuDJTIj+TqqQY7XpNhnrU2UEWXMo4GsDasmjQFhc3rDcxZr Lh+kncEtsYX6VL1oxPs2C9RgZYCxTpeLA4VSKeS+bwk3jCaVKCfPxdZBXKMhi3wN98nj v17L0v16WNzNIDHIA40fJxD2xG8CVpVT9dlTOqo/n4Le6pqxAqgSeRjMuXSGvHXezBEO MIig== X-Gm-Message-State: AOAM532gVXH4Qomb90lXLyyiYPL0DxrwWzuvWrUjsfLmKDiuaV61b0qD 92zwCXqSJOPfWU90qb7vwHoI+jfLHgBUe/vvkL+23A== X-Google-Smtp-Source: ABdhPJwfB6dyrg+sTWpDRwv3H8wVKVZtNuGX3vKm97LCztAam2Ih3cwI2xISOmy3HsqtbizVAcRmL2wQE8LGx/R2oug= X-Received: by 2002:a50:9d47:0:b0:40f:9d3d:97b6 with SMTP id j7-20020a509d47000000b0040f9d3d97b6mr4366784edk.392.1645033868028; Wed, 16 Feb 2022 09:51:08 -0800 (PST) MIME-Version: 1.0 References: <20211210015616.o242b4xchhpglfcy@alap3.anarazel.de> <20220203215048.rmwjzixdzaetedxq@alap3.anarazel.de> In-Reply-To: From: Peter Geoghegan Date: Wed, 16 Feb 2022 09:50:41 -0800 Message-ID: Subject: Re: do only critical work during single-user vacuum? To: Masahiko Sawada Cc: John Naylor , Andres Freund , Robert Haas , PostgreSQL Hackers Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, Feb 16, 2022 at 8:48 AM Masahiko Sawada wrote: > FYI, I've tested the situation that I assumed autovacuum can not > correct the problem; when the system had already crossed xidStopLimit, > it keeps failing to vacuum on tables that appear in the front of the > list and have sufficient garbage to trigger the truncation but are not > older than the failsafe limit. But contrary to my assumption, it did > correct the problem since autovacuum continues to the next table in > the list even after an error. This probably means that autovacuum > eventually succeeds to process all tables that trigger the failsafe > mode, ensuring advancing datfrozenxid, which is great. Right; it seems as if the situation is much improved, even when the failsafe didn't prevent the system from going over xidStopLimit. If autovacuum alone can bring the system back to a normal state as soon as possible, without a human needing to do anything special, then clearly the general risk is much smaller. Even this worst case scenario where "the failsafe has failed" is not so bad anymore, in practice. I don't think that it really matters if some concurrent non-emergency VACUUMs fail when attempting to truncate the table (it's no worse than ANALYZE failing, for example). Good news! -- Peter Geoghegan