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 1jatDU-0006jP-Sg for pgsql-hackers@arkaria.postgresql.org; Tue, 19 May 2020 03:46:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jatDS-0006Gj-TD for pgsql-hackers@arkaria.postgresql.org; Tue, 19 May 2020 03:46:54 +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 1jatDS-0006Dl-M9 for pgsql-hackers@lists.postgresql.org; Tue, 19 May 2020 03:46:54 +0000 Received: from mail-qk1-x744.google.com ([2607:f8b0:4864:20::744]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jatDQ-0002Lz-JK for pgsql-hackers@lists.postgresql.org; Tue, 19 May 2020 03:46:53 +0000 Received: by mail-qk1-x744.google.com with SMTP id f13so13179098qkh.2 for ; Mon, 18 May 2020 20:46:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=mgo5cNr+AWcyd2hGoaLRPBgqhAfp281aJ5VfMEUMkho=; b=FAdLyk9WkRsIWG3mQ/nLQswnctEKRtWAf8mQkJ8sTKeJcbLzUdmIhRxLise+PfV8iW QSP9XsKk84NJI9hnuiNoCOWarMZmWpZ//DHbci7jbXf8lQTGZpQkF7449APEB6FGMQIy v5l963IIYWk/FqM/phQDaJOcAVYeL4YvRsdDUMqOIDkVDj+/EV2n0KTVnN+XxkET+r4J E2wZSlwUz/lWP2LaWmb7gXL17fuQu/1+fdb1utAyzVUpkkvdqx6ksvMDM4W0MuJ9DS91 jiiO4EFGzt4ox/KbebzKS4DlcbUt6GgWBY7UVTJiwpZtY+F48Hm0WkN/LhneY+TJSWey Tctw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=mgo5cNr+AWcyd2hGoaLRPBgqhAfp281aJ5VfMEUMkho=; b=tKaJjk51XKAHFSDODJhEGJgIaJnJW4eBTjg86haDtPY4hgiP9Vq5wCFIZZrarbl/yk UtJossnpoqoT0WHHbq+V5iy1qqy50cdPj+q3oPw6h0xi9qA+TrvJRuT6atjdywd/x63F 654Oqo63JK2TmTGfcURqReBZTDz4+y9l32fq3L6A5ohe24PxF3H0TdnU8aZ334KfBfHB PATVmMhDxDKsLU6XRcZLzCaEV+/AWqu7lQFlRKzXkePCpmT0tC9PoQoMf8UKXWUYLKrT 0BA1D6/X0SOIjQY/ioPLMQwSyc5ndN+m1TGBVUWdfNrq2DQNQfwgeggUCe4pW6N8fI6S 3DpQ== X-Gm-Message-State: AOAM533DLO4gTvReLgWaRfeiTrhjoK9WW/Ph4Bi8nC0DdBwC8zpIFYPQ qkrOvY8XPzA7WQgTxrDuOH/6Xg== X-Google-Smtp-Source: ABdhPJwYGSzEntG2zwUt9irS1C2nUupt5F2AcpwokyURdZzi70qQMbjKrWYHoaGNlH3LNiQj/2SkLA== X-Received: by 2002:a05:620a:22f7:: with SMTP id p23mr18021395qki.261.1589860011663; Mon, 18 May 2020 20:46:51 -0700 (PDT) Received: from nimloth.alvh.no-ip.org ([190.95.18.252]) by smtp.gmail.com with ESMTPSA id e3sm11016491qtg.61.2020.05.18.20.46.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 May 2020 20:46:50 -0700 (PDT) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id 2214F30076A; Mon, 18 May 2020 23:46:49 -0400 (-04) Date: Mon, 18 May 2020 23:46:49 -0400 From: Alvaro Herrera To: Michael Paquier Cc: Andres Freund , Kyotaro Horiguchi , jgdr@dalibo.com, sawada.mshk@gmail.com, peter.eisentraut@2ndquadrant.com, pgsql-hackers@lists.postgresql.org, thomas.munro@enterprisedb.com, sk@zsrv.org, michael.paquier@gmail.com Subject: Re: [HACKERS] Restricting maximum keep segments by repslots Message-ID: <20200519034649.GA8356@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200519024357.GB11835@paquier.xyz> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2020-May-19, Michael Paquier wrote: > On Mon, May 18, 2020 at 07:44:59PM -0400, Alvaro Herrera wrote: > > BTW while you're messing with checkpointer, I propose this patch to > > simplify things. > > It seems to me that this would have a benefit if we begin to have a > code path in CreateCheckpoint() where where it makes sense to let the > checkpointer know that no checkpoint has happened, and now we assume > that a skipped checkpoint is a performed one. Well, my first attempt at this was returning false in that case, until I realized that it would break the scheduling algorithm. > As that's not the case now, I would vote for keeping the code as-is. The presented patch doesn't have any functional impact; it just writes the same code in a more concise way. Like you, I wouldn't change this if we didn't have a reason to rewrite this section of code. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services