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 1mzWxL-00047D-6a for pgsql-hackers@arkaria.postgresql.org; Tue, 21 Dec 2021 04:40:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mzWxJ-00052r-OR for pgsql-hackers@arkaria.postgresql.org; Tue, 21 Dec 2021 04:40:53 +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 1mzWxJ-00052i-D1 for pgsql-hackers@lists.postgresql.org; Tue, 21 Dec 2021 04:40:53 +0000 Received: from mail-pf1-x429.google.com ([2607:f8b0:4864:20::429]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mzWxG-0002aA-EE for pgsql-hackers@lists.postgresql.org; Tue, 21 Dec 2021 04:40:52 +0000 Received: by mail-pf1-x429.google.com with SMTP id c2so10562122pfc.1 for ; Mon, 20 Dec 2021 20:40:50 -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=P2R/sj5QHRU5x/w2aXP+XJyj1slqqhW3KyCncvR9vz0=; b=IKRGDxyuE1qJen/p+3lCP0rDqNMS/Vngr8R7WZCQnUG0UlN0owvpyC0m0uX+nJVaIB W5BIBIsjdusdMREvuQkU99EIftaj/BdjkmCc/xVD/OKAqMcM+LdM3/go5nO/JMCO7uJG G6t0dIApBXf0jgMeuDwMKD1Ent2Z6Yq+ZJeYdt8YVVq+tIofg48IC/hX+6yHKbf5jI+C Rf1Acgv1cjJ0xhy9rzxccT9uNFklZ2F5Rok+iSAl38D99Dzrp/NCfYMEFzVrO/yX7gr9 UdLD53EdQVok5bZP6/aEpSnLtokjZypjmZyaqTz1BhUILQHjgo2tYgK2m7dc2G4zhOqb n/gw== 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=P2R/sj5QHRU5x/w2aXP+XJyj1slqqhW3KyCncvR9vz0=; b=0EmN13InjnGGyJNIE+D+/fKnmXZcobqivR6oJ0Th10xQU60TLARbeH5N8gG8jl1vaJ /YMOTX93X7oR3dtStP8STt4It9imq6KmQVLj8OIW3knZ9XzTCbpGCfJBfaOPXBvcpr3e QD6Rt+WaViMBDEM8V71GkeT41chLWpCQBL7ZNe+PHbDd4AxRp3Vo2GSG0CpiT+V2+zeV LsarGsWYNO/YWpWUm/XKjQgOnzIqCg4GOjs44/phRvajWzvIXM9vMTGUMufIpdwgkdMc ApaM/GfNIN25ZU24I0LxzDfGtvjL7Pvk/llXGQJuYDpibGG0W1mp+iLTwWfdkpA2Sw/Y DM8A== X-Gm-Message-State: AOAM533b4MP/ASLqunP27wNEY5+qwXosNXkuxK5vdVWBnDbcyWrzJDAy CkSx6SSia+9D2WrdJKpWtsPqhleZKTwLQfzoEk0= X-Google-Smtp-Source: ABdhPJyCkWPYtqq+Mgxx4UvtdEzVT8jJnkVK5TNtdIoQfe4kEvqkn1T8qv4cSDc059w0Ginpj9NJA4ECYgL4BmKgN0Q= X-Received: by 2002:a63:5022:: with SMTP id e34mr1386980pgb.114.1640061648298; Mon, 20 Dec 2021 20:40:48 -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: <20211221034630.maoteglpjqpgh62g@alap3.anarazel.de> From: Masahiko Sawada Date: Tue, 21 Dec 2021 13:40:12 +0900 Message-ID: Subject: Re: do only critical work during single-user vacuum? To: Andres Freund Cc: Peter Geoghegan , "Bossart, Nathan" , John Naylor , 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 Tue, Dec 21, 2021 at 12:46 PM Andres Freund wrote: > > Hi, > > On 2021-12-20 17:17:26 -0800, Peter Geoghegan wrote: > > On Thu, Dec 9, 2021 at 8:41 PM Bossart, Nathan wrote: > > > I like the idea of having a built-in function that does the bare > > > minimum to resolve wraparound emergencies, and I think providing some > > > sort of simple progress indicator (even if rudimentary) would be very > > > useful. > > > > If John doesn't have time to work on this during the Postgres 15 > > cycle, and if nobody else picks it up, then we should at least do the > > bare minimum here: force the use of the failsafe in single user mode > > (regardless of the age of relfrozenxid/relminmxid, which in general > > might not be that old in tables where VACUUM might need to do a lot of > > work). Attached quick and dirty patch shows what this would take. If > > nothing else, it seems natural to define running any VACUUM in single > > user mode as an emergency. > > As I said before I think this is a bad idea. I'm fine with adding a vacuum > parameter forcing failsafe mode. And perhaps a hint to suggest it in single > user mode. But forcing it is a bad idea - single user isn't just used for > emergencies (c.f. initdb, which this patch would regress) and not every > emergency making single user mode useful is related to wraparound. +1 BTW a vacuum automatically enters failsafe mode under the situation where the user has to run a vacuum in the single-user mode, right? Regards, -- Masahiko Sawada EDB: https://www.enterprisedb.com/