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 1l0XDV-0005G0-Fe for pgsql-hackers@arkaria.postgresql.org; Fri, 15 Jan 2021 22:05:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1l0XDT-00032Q-II for pgsql-hackers@arkaria.postgresql.org; Fri, 15 Jan 2021 22:05:11 +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 1l0XDT-00032I-7W for pgsql-hackers@lists.postgresql.org; Fri, 15 Jan 2021 22:05:11 +0000 Received: from mail-ed1-x533.google.com ([2a00:1450:4864:20::533]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1l0XDO-0005Pe-HF for pgsql-hackers@postgresql.org; Fri, 15 Jan 2021 22:05:10 +0000 Received: by mail-ed1-x533.google.com with SMTP id by27so11174957edb.10 for ; Fri, 15 Jan 2021 14:05:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb-com.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=0VqrVmi3Ui8GxCa559BDejZytEQKD44Bpxrt20Yzbj0=; b=yfIrFel/WdZZwqRNqPZC76hOucB68vST9obdVbDFhwEQHm/H1yCybKXF7UDVUYRlaW TsGnw757scO42I/AvFWws6UWKMzr/srk1ouYPo+Of5ODxB/c49dchLjpKHuUWfLLj0DX KLwotfkFM/TbFdHKKWq/hQzu6nu5QrOicW273JhMg1/2Bgo/7Iy7WCOYxByzCDeaY+Fq FjmvUc0rRHIklXz/0bo6RxHW3bEkvXc7L8k25ekooWfDnxkh6xaoHyC/NWgx93BlkxEl bFRV8R7C4ENYPTZrAlN92JitWgMQbTZ2u60igpL+OJJkP16i+vYnuwdSWu0JLS4/Ilhc ys4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=0VqrVmi3Ui8GxCa559BDejZytEQKD44Bpxrt20Yzbj0=; b=q2sgoZ63gg+WzNkmQx7nlqDYi+ldr2b5cKmbdyxSXLhGqup/F172OStyvst8BMmjfn JQNxH25ekDwPIAIFu1DBjIOjg+W9dwdrVzPCA1b6Eks0bzRIzyK+MbdK61aFpLAM6dXJ 7QYPxYC1xW50r6sODfLTIYv+jGiIya/vLfBj/E9zaDCSwJBUERC06YjX5zdIC/1XtGhA frybc9wIE2qF5H2rbSJi718ki9tPMFVhZ0C6mTxP20Vcnc7k5aw/HvTGECizjHTxDXx/ yC9Tg1OdHV6zfDNMOz192uyRH93OHt5fkgzJ8nGP57XXv71PsQ5VVLDcpEN9t9Bh+egh eGWg== X-Gm-Message-State: AOAM532hm/HjUd8NrXXJShr/Zrd5bgrV+fCzndT+C6dJ4Vh2j/N5gYE8 V23roKaB9t7soWv3nKJMcgjgSPXRsMi8BnmAsLOSTfvlLf66F0lslT/LwA8FX4RSX+UkupTPN5B Gr3UPYBd5hYpLCxuDda4o0F8kSjK1XtqcYIh32g6xYpd0Ha2F2FGmu+hqSC4Ii/6HpGTwNPCytS nrU0ixbxabIcNpJf/mafI9qsIOeyxSVpkmdO0kQTfw+EFUncbhK8Menk9gYMxXA47PEeQe6fb3/ kdYwGFXN+nSpXJNgp+wKf5FrfNWYq0qPA0mnw== X-Google-Smtp-Source: ABdhPJzfMRyqGFVTrP+SE8Mn6GgH7H0V0asKC02f6laFgJXzpTCUASJSUgXOUkeXa+WADJxhG6kEeg== X-Received: by 2002:a05:6402:3122:: with SMTP id dd2mr2695875edb.262.1610748304374; Fri, 15 Jan 2021 14:05:04 -0800 (PST) Received: from [10.137.0.4] (ip-86-49-253-127.net.upcbroadband.cz. [86.49.253.127]) by smtp.gmail.com with ESMTPSA id t19sm4519791ejc.62.2021.01.15.14.05.03 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 15 Jan 2021 14:05:03 -0800 (PST) Subject: Re: Change default of checkpoint_completion_target To: Andres Freund , Tom Lane Cc: "Bossart, Nathan" , Stephen Frost , Peter Eisentraut , Michael Paquier , Alvaro Herrera , Laurenz Albe , Bernd Helmle , "tsunakawa.takay@fujitsu.com" , "pgsql-hackers@postgresql.org" References: <20201207175329.GM16415@tamriel.snowman.net> <5285eb02-3340-7728-9f62-1a4365eda850@enterprisedb.com> <20201207191742.GN16415@tamriel.snowman.net> <7CFCC359-5786-40DB-90A8-BDB0F08F2ABC@amazon.com> <3258483.1607449295@sss.pgh.pa.us> <20210115215156.uuouk2u44gac6pts@alap3.anarazel.de> From: Tomas Vondra Message-ID: <9cbef4ca-807f-e65a-08bf-4f376aecea41@enterprisedb.com> Date: Fri, 15 Jan 2021 23:05:02 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: <20210115215156.uuouk2u44gac6pts@alap3.anarazel.de> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit 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: Precedence: bulk On 1/15/21 10:51 PM, Andres Freund wrote: > Hi, > > On 2020-12-08 12:41:35 -0500, Tom Lane wrote: >> FWIW, I kind of like the idea of getting rid of it completely. >> Is there really ever a good reason to set it to something different >> than that? If not, well, we have too many GUCs already, and each >> of them carries nonzero performance, documentation, and maintenance >> overhead. > > I like the idea of getting rid of it too, but I think we should consider > evaluating the concrete hard-coded value a bit more careful than just > going for 0.9 based on some old recommendations in the docs. It not > being changeable afterwards... > > I think it might be a good idea to immediately change the default to > 0.9, and concurrently try to evaluate whether it's really the best value > (vs 0.95, 1 or ...). > > FWIW I have seen a few cases in the past where setting the target to > something very small helped, but I think that was mostly because we > didn't yet tell the kernel to flush dirty data more aggressively. > Yeah. The flushing probably makes that mostly unnecessary, but we still allow disabling that. I'm not really convinced replacing it with a compile-time #define is a good idea, exactly because it can't be changed if needed. As for the exact value, maybe the right solution is to make it dynamic. The usual approach is to leave "enough time" for the kernel to flush dirty data, so we could say 60 seconds and calculate the exact target depending on the checkpoint_timeout. regards -- Tomas Vondra EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company