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 1nKNTS-0002NT-2T for pgsql-hackers@arkaria.postgresql.org; Wed, 16 Feb 2022 16:48: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 1nKNTQ-0008Cx-VP for pgsql-hackers@arkaria.postgresql.org; Wed, 16 Feb 2022 16:48:12 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nKNTQ-0008Co-M7 for pgsql-hackers@lists.postgresql.org; Wed, 16 Feb 2022 16:48:12 +0000 Received: from mail-pj1-x102a.google.com ([2607:f8b0:4864:20::102a]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nKNTN-0000Rg-JC for pgsql-hackers@lists.postgresql.org; Wed, 16 Feb 2022 16:48:11 +0000 Received: by mail-pj1-x102a.google.com with SMTP id om7so2939169pjb.5 for ; Wed, 16 Feb 2022 08:48:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=4yoot49Hl8KXRJIo9Ubz0TaQDjm41REimonrvpTLsgU=; b=P+UswxSlxDgJ9ELki+jGvV2K5iFcrc+MLKTLgqZLl3Pz80NyRhUDwq9Oy7tHdd1+vK 1AzchhhV8ZjbhoYMxt+0ghG8IYh7Je0MLo1Oq8YS2hpjXGyITrhxpKVoi4druiQXzPi8 iivUvwf4wuRTXEiGR7XIoDWnHWrs6FuV19xfHyksIh3Oh1RjRzmJlDQXXVmrCYtZgerv TCPbGDHirTC0DnEsus+ngspQUkxwuINxsHQhIxbvYCyLDCxxLry4Y0BG9APn3EMp0U0B F9t5hWK6MupCp2zpEH8CPcQU6QarwjV+WcQvacrKxv55+XI1ifwNgI20xoBmnf5VXIdH iiCg== 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=4yoot49Hl8KXRJIo9Ubz0TaQDjm41REimonrvpTLsgU=; b=WOK0XhAYLCkYJQ4zvf67++nY7sevt/1XmQMI/+FhOKTk3xD8r0dxS6dayfzh+Hbdg+ 7xe3R0LuiOl5PYiAIj9CXpcHcbIAcT4gGijG41gyC+nTECb6Co05m6XC6dMc1TPrcIY4 A7ma+ODyw4GG++SjtoIwMHd6FkYztfPdCZ1MtYoWabhmgrPDW40NI71fmsPczfE9YNsw AZRW5mdHrzL0CyEAR1CU1EiJYfO/qyQRYtOxvUB+8SCat6zm2g2o743/ABp/8ewb/577 4o7LnF/coMe7t+ja/36Zzf/hKaVMUJY6353Mb8qXR40GI5WBK917jrB9HXuUPQUX7UPe mxiA== X-Gm-Message-State: AOAM530y3Nmy1sMaaLwgjWs2NCrnxQV+29yQop1Ct7sz56Wcprbn07Rr D1RzoutrM1+LsXTVl+AhfqwyWJ29AR8bg/mTOoo= X-Google-Smtp-Source: ABdhPJxYDVvu+/VwqsEG060c0h5NT+Hl6gAQ1fu14u0h0zOdk8gtsani6pKDEnAvjBGlL9OJskQFLw4/c7tF/hRr8E0= X-Received: by 2002:a17:902:ed8e:b0:14f:40da:1251 with SMTP id e14-20020a170902ed8e00b0014f40da1251mr3130231plj.15.1645030088478; Wed, 16 Feb 2022 08:48:08 -0800 (PST) MIME-Version: 1.0 References: <20211210015616.o242b4xchhpglfcy@alap3.anarazel.de> <20220203215048.rmwjzixdzaetedxq@alap3.anarazel.de> In-Reply-To: From: Masahiko Sawada Date: Thu, 17 Feb 2022 01:47:31 +0900 Message-ID: Subject: Re: do only critical work during single-user vacuum? To: Peter Geoghegan 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 2:29 AM Peter Geoghegan wrote: > > On Mon, Feb 14, 2022 at 10:04 PM John Naylor > wrote: > > Well, the point of inventing this new vacuum mode was because I > > thought that upon reaching xidStopLimit, we couldn't issue commands, > > period, under the postmaster. If it was easier to get a test instance > > to xidStopLimit, I certainly would have discovered this sooner. > > I did notice from my own testing of the failsafe (by artificially > inducing wraparound failure using an XID burning C function) that > autovacuum seemed to totally correct the problem, even when the system > had already crossed xidStopLimit - it came back on its own. I wasn't > completely sure of how robust this effect was, though. 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. Regards, -- Masahiko Sawada EDB: https://www.enterprisedb.com/