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 1lzzWj-0006Lx-W9 for pgsql-hackers@arkaria.postgresql.org; Sun, 04 Jul 2021 10:39:06 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lzzWh-0006I9-ST for pgsql-hackers@arkaria.postgresql.org; Sun, 04 Jul 2021 10:39:03 +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 1lzzWh-0006I0-Iz for pgsql-hackers@lists.postgresql.org; Sun, 04 Jul 2021 10:39:03 +0000 Received: from mail-pl1-x62f.google.com ([2607:f8b0:4864:20::62f]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lzzWe-0007yF-4H for pgsql-hackers@lists.postgresql.org; Sun, 04 Jul 2021 10:39:03 +0000 Received: by mail-pl1-x62f.google.com with SMTP id z13so1101288plg.8 for ; Sun, 04 Jul 2021 03:38:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=6kyzAuwa3KCFPMXPCst4sEhekD9LesvM70cBzqOWY30=; b=eUkttFG7eXuWIozSjBuS9nFnBtXDmlrZ1W3/d0UoaTAtNSiTYT756XypjOW8jdIMri Il8t9vMpOMYeK4Kkg99NSIHXNlEfAErqke+zJ+6h+6aclFytpgjGp5mgH/ilj2Nw3DoM SwstvWORXWaf51PcH76xBBIAMAinSIDYQAqOm1z6z2jdkfcQJEQUQAJfenRlpv9cz6Ad TH+LckmayHGCqR6xc/2m6pAOPMT7uHipNwfa3/3ju2z/kfxiGAatNAO37A+iW+CSll3J Beje82MOvTOSuT9pMAH5LShWYYasfX7PCJ7WvCWz4Gmbcv03myWpz+k0u4SsW6T308/2 DjHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=6kyzAuwa3KCFPMXPCst4sEhekD9LesvM70cBzqOWY30=; b=N9jN0mYAk52F6GQ8ifc37U+cFzSoW56lp5/Kniv4of8ozmQv5x+zFZYuVzXcevMMme 4QQa+MRmIexv5dk95CEb0FMDuCD3gymeoUTabts/L29EXqHLSGDMFaN9Ip821PJB0ngt aMOGjYKjJYblz00mthSyau2i22ziJkUVO3phfYFJnt8dAxYO6v5PxUiL6GIelZp/n7x5 xZvyNccfJMOpvhCpdSn2di37fbCUehEKdohy2Yuke190k4CVHcYFNbet0Zg7KkK6ViO4 kO50VkEKWWeQyPC1qziRdhCIranprEbG2DUuhqi7xO0ocmwaOYbqX5FQhMCA4ofPpi7/ vjNA== X-Gm-Message-State: AOAM532m33dZfZL57Srq8HNsRt74sFG1qAAd3GNz5BjEbgcz75kU3jQA cpwU3Ufg/VQNAUTfI6ufvqzzTikfSv2rUZxM2QA= X-Google-Smtp-Source: ABdhPJygnRjC5f11ZQLQRN7Shj6SqFuV0bB4tIvxBbXSsYgisXQa9UpEatkgYT5sIO2jzQzOVcNA7lw0EbNBpcO+fOI= X-Received: by 2002:a17:902:d692:b029:126:a2da:92f9 with SMTP id v18-20020a170902d692b0290126a2da92f9mr7494425ply.67.1625395138058; Sun, 04 Jul 2021 03:38:58 -0700 (PDT) MIME-Version: 1.0 References: <1c6fa18692a77ff6098dedc0c150df24ffe9db89.camel@cybertec.at> In-Reply-To: From: David Rowley Date: Sun, 4 Jul 2021 22:38:33 +1200 Message-ID: Subject: Re: Update maintenance_work_mem/autovacuum_work_mem to reflect the 1GB limitation with VACUUM To: Laurenz Albe Cc: =?UTF-8?B?TWFydMOtbiBNYXJxdcOpcw==?= , PostgreSQL Developers Content-Type: multipart/mixed; boundary="000000000000d3789f05c649cb66" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000d3789f05c649cb66 Content-Type: text/plain; charset="UTF-8" On Sat, 3 Jul 2021 at 00:40, Laurenz Albe wrote: > > On Fri, 2021-07-02 at 23:31 +1200, David Rowley wrote: > > I had a look at the patch in [1] and I find it a bit weird that we'd > > write the following about autovacuum_work_mem in our docs: > > > > + > > + Note that VACUUM has a hard-coded limit of 1GB > > + for the amount of memory used, so setting > > + autovacuum_work_mem higher than that has no effect. > > + > > > > Since that setting is *only* used for auto vacuum, why don't we just > > limit the range of the GUC to 1GB? > > > > Of course, it wouldn't be wise to backpatch the reduced limit of > > autovacuum_work_mem as it might upset people who have higher values in > > their postgresql.conf when their database fails to restart after an > > upgrade. I think what might be best is just to reduce the limit in > > master and apply the doc patch for just maintenance_work_mem in all > > supported versions. We could just ignore doing anything with > > autovacuum_work_mem in the back branches and put it down to a > > historical mistake that can't easily be fixed now. > > > > I think that is much better. > I am fine with that patch. Thanks for looking. I've pushed the doc fix patch for maintenance_work_mem and back-patched to 9.6. I could do with a 2nd opinion about if we should just adjust the maximum value for the autovacuum_work_mem GUC to 1GB in master. I'm also not sure if since we'd not backpatch the GUC max value adjustment if we need to document the upper limit in the manual. David --000000000000d3789f05c649cb66 Content-Type: application/octet-stream; name="set_maxvalue_for_autovacuum_work_mem_to_1gb.patch" Content-Disposition: attachment; filename="set_maxvalue_for_autovacuum_work_mem_to_1gb.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_kqp29v220 ZGlmZiAtLWdpdCBhL3NyYy9iYWNrZW5kL3V0aWxzL21pc2MvZ3VjLmMgYi9zcmMvYmFja2VuZC91 dGlscy9taXNjL2d1Yy5jCmluZGV4IDQ4MGU4Y2QxOTkuLmJiNzZiYWE3MmQgMTAwNjQ0Ci0tLSBh L3NyYy9iYWNrZW5kL3V0aWxzL21pc2MvZ3VjLmMKKysrIGIvc3JjL2JhY2tlbmQvdXRpbHMvbWlz Yy9ndWMuYwpAQCAtMzM0MCw3ICszMzQwLDggQEAgc3RhdGljIHN0cnVjdCBjb25maWdfaW50IENv bmZpZ3VyZU5hbWVzSW50W10gPQogCQkJR1VDX1VOSVRfS0IKIAkJfSwKIAkJJmF1dG92YWN1dW1f d29ya19tZW0sCi0JCS0xLCAtMSwgTUFYX0tJTE9CWVRFUywKKwkJLyogc2VlIGNvbXB1dGVfbWF4 X2RlYWRfdHVwbGVzIGlmIHlvdSBuZWVkIHRvIGNoYW5nZSB0aGUgbWF4IHZhbHVlICovCisJCS0x LCAtMSwgMTAyNCAqIDEwMjQsCiAJCWNoZWNrX2F1dG92YWN1dW1fd29ya19tZW0sIE5VTEwsIE5V TEwKIAl9LAogCg== --000000000000d3789f05c649cb66--