Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h2hAz-0007NJ-VQ for pgsql-hackers@arkaria.postgresql.org; Sat, 09 Mar 2019 18:58:30 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1h2hAy-0000nY-Aa for pgsql-hackers@arkaria.postgresql.org; Sat, 09 Mar 2019 18:58:28 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h2hAx-0000nR-So for pgsql-hackers@lists.postgresql.org; Sat, 09 Mar 2019 18:58:28 +0000 Received: from mail-oi1-x241.google.com ([2607:f8b0:4864:20::241]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h2hAu-0000KY-B2 for pgsql-hackers@lists.postgresql.org; Sat, 09 Mar 2019 18:58:26 +0000 Received: by mail-oi1-x241.google.com with SMTP id a81so672486oii.11 for ; Sat, 09 Mar 2019 10:58:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=from:subject:to:cc:references:openpgp:autocrypt:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=QAQXvuzbJGcdWJyhH2o8NKMipkhyZrGxRa00JDh4cdg=; b=Ys2PWYDWj9ZuiDJJOR7g1WnzzW2VepxZsTrcWDWZajkjqW+8TYkhf/VyK13Z02f/22 LugWJ3UrEnzPVHIMHzA/eODSkhltwal4ElB+6tKjUrt4/ZCh9Jk2yhi0/T3n/OzcKiq4 KPeUH63q0iB7GtrhfVAdJIEAKCx0Rwjs0F5m0xsOOFQrJUM1Wa5x3cpwbYE5EbZdLcQZ yZ64AzlW6LJvfb7pbZPOD/LO99FDbzNb5CjLGgCYbmGiXxauXy9JhedxSu61QuJSunA4 Iz2iOGxgDLTDLOut+0no4DtLwgwbd7I7g9Bbes9wyu8Oz2YYy+WFQmMRAReYLOXzAXCo iKqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:cc:references:openpgp:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-transfer-encoding:content-language; bh=QAQXvuzbJGcdWJyhH2o8NKMipkhyZrGxRa00JDh4cdg=; b=oOiT2+5yIFqCzOv7Q4W51Qw9kM5t/lMR+rAwPuku65sfsguyoVMlcu5iOQUot7pOYe 2kRJudoWeykEBLwd8vcZ0L5SEppcVQHwyjn4bz8rOj9GI2/aj2DvY4oMPr+vnHmVpmTp Rchb/6Vns0DXj5BjdNgFRR1SXnZfYPLn6FBsMp4H8XmV1QgNOutwCmcNRU93u9oaXimA zTqnhec6aPwFsUkyD6QExOStZ+GwKtfFR/t0/+Gx0NMtaIGbtVIUZ4Rn1SZTzS41DGKs iGZPkpkr9re/BtvPv1WCkNJWuzT6plaxEv2/F4pDuT7vLs0nfBswapgad0XnQHa7VwbP eKyQ== X-Gm-Message-State: APjAAAXwwLCCD/nHh0LKnpKd5BG7G3sXeuob1Goo2EWLYYd4MoUw1Y+e dxMH0HnOenOCnk1UtmT4ejhB37yFl24OEuLdn720SgUQeSwa4H/EO8gCtpo8JnpI5MckJcmCaA/ lJnzAe5sVoPto0b6S0f5zOmO3jHdwQhchfqACymFdN1pxOyH2DNldVgtrX6Xh8OpOC69UVJA41E 3TnRfTdPOJXhwx3jQ1uZiA X-Google-Smtp-Source: APXvYqwpm9pDw5Xy++cDktzDRt3lYfAoZY3eboC94Z3YdPwl18ydR3DDj4xs82DcJ53IXkvqvQpKjQ== X-Received: by 2002:aca:d946:: with SMTP id q67mr12489476oig.102.1552157902958; Sat, 09 Mar 2019 10:58:22 -0800 (PST) Received: from [192.168.10.146] (99-10-92-30.lightspeed.rlghnc.sbcglobal.net. [99.10.92.30]) by smtp.gmail.com with ESMTPSA id t66sm437266oig.39.2019.03.09.10.58.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 09 Mar 2019 10:58:21 -0800 (PST) From: Andrew Dunstan X-Google-Original-From: Andrew Dunstan Subject: Re: Should we increase the default vacuum_cost_limit? To: Tom Lane Cc: David Rowley , Jeff Janes , Jeremy Schneider , Joe Conway , Peter Geoghegan , PostgreSQL Hackers References: <241b80ab-7af0-c606-7b2c-b0a5d6be696a@joeconway.com> <4a068b09-5a6f-e975-07c9-2333fcef0a8a@amazon.com> <30411a5b-ef11-71ef-e9ee-4d26ef3fd0c0@2ndQuadrant.com> <21034.1552068630@sss.pgh.pa.us> <13d143dd-0a44-0c16-218c-bc924b5922f0@2ndQuadrant.com> <26656.1552096451@sss.pgh.pa.us> <28720.1552101086@sss.pgh.pa.us> <203719fc-1970-4a49-8013-eba3fd109b19@2ndQuadrant.com> <24300.1552154154@sss.pgh.pa.us> Openpgp: preference=signencrypt Autocrypt: addr=andrew.dunstan@2ndQuadrant.com; prefer-encrypt=mutual; keydata= xsBNBE7KWFkBCAClridxur2AIc7eW2AR7izbfp3EnNefie2HbLF0izW5Ik5UjX2HBXBx4syI gY6b0ugohXrr274+baoAlvSbq6cAoQuEVrk5IZFzt20b1Xkx65FwGSEj526yiKLocqkJceSq Xr9xcA5SGY+FZv441chh5SU92v4q6z+6LPpoHOh97ptAVXZYNTtU0LevyvD5lja0TzbvJm6C eFXitJfnm1pLEr0DGJCR/iUOl/N62Kh4855zZC7NHIjQHPOvV5Stz/l5ilDhvGVk+xkXFPys SjZoUr1rXhYLpiyi5sR0X9FHXT0KnGuz1F5ERO7ZTLSSQ6fJwPj6gOk9K+vvoKvoeql5ABEB AAHNL0FuZHJldyBEdW5zdGFuIDxhbmRyZXcuZHVuc3RhbkAybm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NRqqQDMIy1fU6KyQFLmQJp/QJyhKWzm9jWh8ee w8jVaoMY0Kbq5N7RqisEx1Lu/Iw646UphdYzQNymf+kbiU5Kf4I6DhzV8w9sie1Bo1juNj3I c5/fFJsmxljbnaDbXPcnFsur1Oo9mIHFakgWgOBMuxoWfjONiLjjLh/9+ZIqSSLX Message-ID: Date: Sat, 9 Mar 2019 13:58:20 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.0 MIME-Version: 1.0 In-Reply-To: <24300.1552154154@sss.pgh.pa.us> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-MW List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 3/9/19 12:55 PM, Tom Lane wrote: > Andrew Dunstan writes: >> On 3/9/19 4:28 AM, David Rowley wrote: >>> I agree that vacuum_cost_delay might not be granular enough, however. >>> If we're going to change the vacuum_cost_delay into microseconds, then >>> I'm a little concerned that it'll silently break existing code that >>> sets it. Scripts that do manual off-peak vacuums are pretty common >>> out in the wild. >> Maybe we could leave the default units as msec but store it and allow >> specifying as usec. Not sure how well the GUC mechanism would cope with >> that. > I took a quick look at that and I'm afraid it'd be a mess. GUC doesn't > really distinguish between a variable's storage unit, its default input > unit, or its default output unit (as seen in e.g. pg_settings). Perhaps > we could split those into two or three distinct concepts, but it seems > complicated and bug-prone. Also I think we'd still be forced into > making obviously-incompatible changes in what pg_settings shows for > this variable, since what it shows right now is integer ms. That last > isn't a deal-breaker perhaps, but 100% compatibility isn't going to > happen this way. > > The idea of converting vacuum_cost_delay into a float variable, while > keeping its native unit as ms, seems probably more feasible from a > compatibility standpoint. There are two sub-possibilities: > > 1. Just do that and lose units support for the variable. I don't > think this is totally unreasonable, because up to now ms is the > *only* workable unit for it: > > regression=# set vacuum_cost_delay = '1s'; > ERROR: 1000 is outside the valid range for parameter "vacuum_cost_delay" (0 .. 100) > > Still, it'd mean that anyone who'd been explicitly setting it with > an "ms" qualifier would have to change their postgresql.conf entry. > > 2. Add support for units for float variables, too. I don't think > this'd be a huge amount of work, and we'd surely have other uses > for it in the long run. > > I'm inclined to go look into #2. Anybody think this is a bad idea? > > Sounds good to me, seems much more likely to be future-proof. cheers andrew -- Andrew Dunstan https://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services