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 1mzmjI-0002ai-43 for pgsql-hackers@arkaria.postgresql.org; Tue, 21 Dec 2021 21:31:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mzmjG-0003Hv-R9 for pgsql-hackers@arkaria.postgresql.org; Tue, 21 Dec 2021 21:31:26 +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 1mzmjG-0003Hl-7I for pgsql-hackers@lists.postgresql.org; Tue, 21 Dec 2021 21:31:26 +0000 Received: from mail-ot1-x334.google.com ([2607:f8b0:4864:20::334]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mzmjA-0000eV-Ms for pgsql-hackers@lists.postgresql.org; Tue, 21 Dec 2021 21:31:24 +0000 Received: by mail-ot1-x334.google.com with SMTP id r10-20020a056830080a00b0055c8fd2cebdso151915ots.6 for ; Tue, 21 Dec 2021 13:31:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=F4DD05eyCj6UNB39EqaHPHXecEyW7zRNYJCC8cYNvWg=; b=cBnmjGCj4qarEHZFd7IxXxew00GfzHO2ADddQ5athIqVUbAD+4KPpHpH8tjHQIVCMo 6peAZ3fhznw/fy2X/q6Fx/lEDGgT9qAIXSt9nHrScof+dOUar2cbdKLhr4gbvGfrnS/O VGn5mwdjTsTLaAdtCqguKF4G6fQFKVddtZjrO3PaPLvIRu96405jXUI5MF5F8uyrD3VH yFPipGDI9VZMxWwPCmz6L/cZ4ETWLvEY8z11v/0nkIL+rBxQk+xQJT31keB6JMjVgv7C owRgErpFkHrGy3etOqJ5ZOaye1j3HMxDpS27/r6uiKBaOgzs2MKdtDarF4nf8r6trinv uDtw== 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=F4DD05eyCj6UNB39EqaHPHXecEyW7zRNYJCC8cYNvWg=; b=HTaFoje0lBpnjRH7JpnbPa5yVAKWFPxNTWvJzabgQz+ck2qfq1Hpib3ZYDLGAE1P2w sEWkIzP5HPQsEvLKU1yiel+IWSZYSbtkswRRP39bZx1uNbkW41IzYXFmK+tpmAssHIcY i/wz7b0Q5WOOinJhXY8AU676BsLH/uM1U52hCvxZmjjTz96nQlkuJbxMsYmkH1vavMcD v4fQhigNSownYZse3xlsHOo/EuW15JjXxKJJbiOpbHgMsrQ7xknU1hXle7FpmQUJmPP8 ptaFRGmdw8mksGalXQeaoKzVIsG0fz99GfOyREkBpSr3HcLxo9Xc3QQlvT8AVJSt4mRZ gdDw== X-Gm-Message-State: AOAM531EdPVnLC49/VfpTT/o3TAuZCb7us37EWZDy8i7+c7DVOkXbuph aXce56OgZ98LMPj5Qh2F9uF6xDJQYABtdZC7Leg46OkvOcUhowvEAigh6kuwFIUct5wVoA5cr0r 0sS5eMPoncuhM6MoRs+zRNc52cnz6HMkVUYLryNVC+YC3HPNYKjVWh7SoYU3BHu9oRvIdIydEF3 QirrfRbTkvwEXyeJOr43knqC4r9xn2OCDG4k4yMW951sQPsdF30UoE/Xi9iu9dtXZwb4I8 X-Google-Smtp-Source: ABdhPJzBlQQlQsKh3tgGWcyqahaqtyNTg17+fPss0qGpJMIfyUbVZHriHsBUWLIWYVfYD8eKuPlCShxdhvrV+86W9KM= X-Received: by 2002:a05:6830:44f:: with SMTP id d15mr196936otc.70.1640122279638; Tue, 21 Dec 2021 13:31:19 -0800 (PST) MIME-Version: 1.0 References: <3F7FD826-36EF-4991-AB37-81675AFEBF54@amazon.com> <0544901A-0FC5-46B5-801B-F30AC0B81A19@amazon.com> <20211221034630.maoteglpjqpgh62g@alap3.anarazel.de> In-Reply-To: From: John Naylor Date: Tue, 21 Dec 2021 17:35:05 -0400 Message-ID: Subject: Re: do only critical work during single-user vacuum? To: Masahiko Sawada Cc: Peter Geoghegan , Andres Freund , "Bossart, Nathan" , PostgreSQL Hackers Content-Type: text/plain; charset="UTF-8" X-CLOUD-SEC-AV-Info: enterprisedb,google_mail,monitor X-CLOUD-SEC-AV-Sent: true X-Gm-Spam: 0 X-Gm-Phishy: 0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk I wrote: > Instead of a boolean, it seems like the new option should specify some > age below which VACUUM will skip the table entirely, and above which > will enter fail-safe mode. As mentioned earlier, the shutdown hint > could spell out the exact command. With this design, it would specify > the fail-safe default, or something else, to use with the option. On second thought, we don't really need another number here. We could simply go by the existing failsafe parameter, and if the admin wants a different value, it's already possible to specify vacuum_failsafe_age/vacuum_multixact_failsafe_age in a session, including in single-user mode. Perhaps a new boolean called FAILSAFE_ONLY. If no table is specified, then when generating the list of tables, include only those with relfrozenxid/relminmxid greater than their failsafe thresholds. -- John Naylor EDB: http://www.enterprisedb.com