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 1mvQjg-0007UF-Uv for pgsql-hackers@arkaria.postgresql.org; Thu, 09 Dec 2021 21:13:52 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mvQjA-0007Ug-7d for pgsql-hackers@arkaria.postgresql.org; Thu, 09 Dec 2021 21:13:20 +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 1mvQj9-0007UW-UQ for pgsql-hackers@lists.postgresql.org; Thu, 09 Dec 2021 21:13:19 +0000 Received: from mail-ed1-x531.google.com ([2a00:1450:4864:20::531]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mvQj7-00058v-M7 for pgsql-hackers@lists.postgresql.org; Thu, 09 Dec 2021 21:13:18 +0000 Received: by mail-ed1-x531.google.com with SMTP id o20so24071262eds.10 for ; Thu, 09 Dec 2021 13:13:17 -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=f6RXPu62kwB4QXX6WYZFHnU5tz7tmYHPYxyktWXr2IA=; b=Zngjxz7l4h3Rve8CUcCi5suPlfeM06/LcqgYeeee4L5NWHeL8k8rxBXYwChw4IuLch HTNuo3kmvEZWNs9AanoxOSnnuvnfrRcnhFMFY4Cw+Z3AatAOw0Kk3W70Q1YdbEMxHRlq sH82ZpWRugjn/N73ySBqbzR2DIp/AomT3RT1CY5xsctdCgW5YJk3dp4sMOfVZm4oc9DF MJ384N7Yba9hTe8krBFZRmf4t/CV7o+tFKYm6LD00v3mk/9B0sQ6xGyd9Otymwnu414l ssm2mD/2bkIRLftAJXlM52Q8Z8KWFCuOGiHeq7MO69IIbqoD6uWZI4V/S6Yw0nkNPVC6 ZBBw== 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=f6RXPu62kwB4QXX6WYZFHnU5tz7tmYHPYxyktWXr2IA=; b=3amdXxx+xHa9xE481Y3kmtDHA2z/LmxXmG+6NE0sRijF2QFItQTPvBXIPYuEp8mwy/ qSdOfdQOvhm8+n2vmG/nFnR5cYub9nV3SpaHBn0P1UiAhgYMhG/VNplpofYHv5ktEpgv kMZ8GVgWZV/+4yLMa14sCBcWDY8mk2btQYS2lX19hP/oUO5kNGG8fBt29RGjYHRX6z3R S0tLMS/e1Y9Nwh3Uic78550c+QcGlz1oKB6IXpKBLs76X/HCqwHX8Sh/9AlYI4uhtkHq O4fDnHjMig74uhgzPxZ61V84FyLnu/fwrrq7bu4CXEWKnK0Fc3qQ1ulUk0D6Q8KF34BD 674g== X-Gm-Message-State: AOAM5307bHcZRQ7OsA+68M2AnER3hSo2Wj1lubrOeVBf8aUBuFZelUeU wr+8aKzBhqUaW/1esqwc/wPyy+L8XSr+Zd8N/YMIZ+Yy2x4= X-Google-Smtp-Source: ABdhPJwzT6FS1x32i+9KOJyWyaWMvI8bpIKkF4twLDcVcCAJxOObPCmH39uK9kof1MUkggDOKepllQ+2IeHbK1oRxEw= X-Received: by 2002:a17:907:9156:: with SMTP id l22mr18338010ejs.220.1639084396274; Thu, 09 Dec 2021 13:13:16 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Peter Geoghegan Date: Thu, 9 Dec 2021 13:12:50 -0800 Message-ID: Subject: Re: do only critical work during single-user vacuum? To: John Naylor Cc: 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 Thu, Dec 9, 2021 at 1:04 PM Peter Geoghegan wrote: > On Thu, Dec 9, 2021 at 11:28 AM John Naylor > wrote: > > Now that we have a concept of a fail-safe vacuum, maybe it would be > > beneficial to skip a vacuum in single-user mode if the fail-safe > > criteria were not met at the beginning of vacuuming a relation. > > Obviously the main goal of the failsafe is to not get into this > situation in the first place. But it's still very reasonable to ask > "what happens when the failsafe even fails at that?". This was > something that we considered directly when working on the feature. Oh, I think I misunderstood. Your concern is for the case where the DBA runs a simple "VACUUM" in single-user mode; you want to skip over tables that don't really need to advance relfrozenxid, automatically. I can see an argument for something like that, but I think that it should be a variant of VACUUM. Or maybe it could be addressed with a better user interface; single-user mode should prompt the user about what exact VACUUM command they ought to run to get things going. -- Peter Geoghegan