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 1nKPpE-0007ne-NF for pgsql-hackers@arkaria.postgresql.org; Wed, 16 Feb 2022 19:18: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 1nKPpD-0006e0-Iu for pgsql-hackers@arkaria.postgresql.org; Wed, 16 Feb 2022 19:18:51 +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 1nKPpD-0006dq-68 for pgsql-hackers@lists.postgresql.org; Wed, 16 Feb 2022 19:18:51 +0000 Received: from mail-ed1-x52a.google.com ([2a00:1450:4864:20::52a]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nKPp9-0001bk-8h for pgsql-hackers@lists.postgresql.org; Wed, 16 Feb 2022 19:18:50 +0000 Received: by mail-ed1-x52a.google.com with SMTP id i11so3995858eda.9 for ; Wed, 16 Feb 2022 11:18:46 -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=tSzK4ns1tmTCQhJJWjDjjsi25egbePCaRNXbDke+yP4=; b=x9Lq66I1LEJcEyFMYqwTdbXh/RJu78G6MpcPanDJMUV9gGkhCnK7T7ohGQ2s2bGqOf H2Cj6BDL082aOxJD1pXrXcTHX4RzdpyNNzbBPW9f6sXATuR+lSXpk3mj+hnwAPKSlbj8 o5JwuVhOENfi1QKkMUY9DvzroXNfdl9mvwu32dr+TeqrOXe269ckUfihSu5Y3V0rtQBh 9Bpwe+RW0TiuS+1Klz2sewgueDxjU+L/jcm2qwARe43rOyYEkrPwaPNZKqK2s0SujgWR vHAoAMUMGPj6S4FzxK3uJZ/nwBlZOqemz/0+7WkY8Srs2lmgZqUqSPRin5zkWav1sOjS Z9OQ== 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=tSzK4ns1tmTCQhJJWjDjjsi25egbePCaRNXbDke+yP4=; b=pLsxlzF8iKW0iLIOOOSHrJ6LemcOIMSSl20vla+x85+QDi41gH/3H5bpCreELpRAzn A4d+u8Ce7B1YbWcEwkfVPLnS81LZ/1P/Nj4+AYVheK/QSS9anASBlyqXKKv83ggnhDsX uWqhn+Se4zPMItMDHHNKEsrxnAUgEFNKgc6L4VSxkwREqYpeML7An1o69XyR2YU6MerK ZrcUQY805HMSKWMfO/B5tuFDw7mjb0uRiLnBDFe1LOOYJW8cZ2FudufpZQ/BKHCdbAiZ +g/AzSvQv8iIsVDoyK7RWv5M0q86edKhfqzoBva3lKkAb1OWLcqXXoVt4CGlbYQS3OGh qJyw== X-Gm-Message-State: AOAM532V+dBwV/2HVMs2Qkupl1sj1Jf8oIquPInBsoFQcK8C+G5d+0mt VaFFzz3egy3thnTFgwDsYLnhljmTmpqDNgBhtKacYg== X-Google-Smtp-Source: ABdhPJxevb1ug/2A+qnPH6SZ7TL4b84Hk1CLGlaMQkrF44dsksN/xxJ1h5wCuYL+7/3bBtHBZkJsj4bvAoyxspCt3aI= X-Received: by 2002:a05:6402:168e:b0:410:d2a4:b0dd with SMTP id a14-20020a056402168e00b00410d2a4b0ddmr4511647edv.403.1645039125631; Wed, 16 Feb 2022 11:18:45 -0800 (PST) MIME-Version: 1.0 References: <20220203215048.rmwjzixdzaetedxq@alap3.anarazel.de> <20220216181846.4syh3mnq5qzjrdiz@alap3.anarazel.de> In-Reply-To: From: Peter Geoghegan Date: Wed, 16 Feb 2022 11:18:19 -0800 Message-ID: Subject: Re: do only critical work during single-user vacuum? To: Andres Freund Cc: Robert Haas , Masahiko Sawada , 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 Wed, Feb 16, 2022 at 10:27 AM Peter Geoghegan wrote: > True, but the most recent version where that's actually possible is > PostgreSQL 8.0, which was released in early 2005. It just occurred to me that the main historic reason for the single user mode advice was the lack of virtual XIDs. The commit that added the xidStopLimit behavior (commit 60b2444cc3) came a couple of years before the introduction of virtual transaction IDs (in commit 295e63983d). AFAICT, the advice about single-user mode was added at a time where exceeding xidStopLimit caused the system to grind to a halt completely -- even trivial SELECTs would have failed once Postgres 8.1 crossed the xidStopLimit limit. It seems as if the advice about single user mode persisted for no great reason at all. Technically there were some remaining reasons to keep it around (like the truncation thing), but overall these secondary reasons could have been addressed much sooner if somebody had thought about it. -- Peter Geoghegan