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 1jLV1g-0000iH-UN for pgsql-hackers@arkaria.postgresql.org; Mon, 06 Apr 2020 16:55:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jLV1f-0007PO-Gz for pgsql-hackers@arkaria.postgresql.org; Mon, 06 Apr 2020 16:55:07 +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 1jLV1f-0007PG-5H for pgsql-hackers@lists.postgresql.org; Mon, 06 Apr 2020 16:55:07 +0000 Received: from mail-qv1-xf41.google.com ([2607:f8b0:4864:20::f41]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jLV1Y-0001Oa-PF for pgsql-hackers@lists.postgresql.org; Mon, 06 Apr 2020 16:55:06 +0000 Received: by mail-qv1-xf41.google.com with SMTP id n1so294197qvz.4 for ; Mon, 06 Apr 2020 09:55:00 -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=MLasb3Se0KZPT+c70RbLYNrsKmt+TGQdZP6TBGdBIfM=; b=Ku4mQujfzj/Hy+STx0m6FMye95R0jPp+zDG5wTOsTU/N+xtnc0KxKtfBFQGQKrguSj 3bdcWSwHtX8pvJMUdv0XOThHy9ss/Rp7/hHTGCwq12oV1rTZx0apimi2xuHZzTquGGed KsERzJJjkHI0/L7QefdxY/hSfI8mUWtRbto3bQvVwZNeB+1Y/g8RugPVpWE3UJOsgvnc wwSeZS0+SC9/c8LDuZJsYmNq3M6h12kB0mnT+P4uwZerV5x1NEOZHYEHYqgTEorWgGqN a03xwPrzKAr9g46xO52yJf7vz6mS6sgHbWo4e5j4pSSBbaIYHR4soUFTPHjcd7xnd5+D u+Cg== 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=MLasb3Se0KZPT+c70RbLYNrsKmt+TGQdZP6TBGdBIfM=; b=IwndJC1TX6SpHIZoSb1Q7K8NV82zi2rcwHGk3RkTWpKgNLAZO2dfMW1qIVfzsYyoC+ E0ErnMHJlQdeU2SLMQh1M/bWigmhEPOWxJCQ9zYDkdZ2JxqepNsHyqWWSOiIBdqLGuYq 6sCmQQhmdN26ZWFHICe1/NlLNVMFkEk9J+CIu2eiLbTVWYoszHp2vLcxutZGyoAbwiBA kqBAeZEHbt6XRaPtyhSXWWbQ8ZqQYrE8wnd1Q4B3PxrAX6DjMBd3WHg/zoxIlYM4nAbg EkWl4d3lsS5/7sKuoM9wSYnn+p8KixjzetLcT5xQDdB1GWcLgMSe5UVMAB6ILZV8K6J2 jr0Q== X-Gm-Message-State: AGi0PuaP8DiWwFMau4pBJ1C5YtDrpUOJXTbJ5N5pHwpUCtktGLyXiqcc wlxipU5/ss1t3NR+9exMEkxCew== X-Google-Smtp-Source: APiQypICTvIpCBVMgcR3U7akYsmwx325S+ZcVv31BYuS/eWdtDDmT9mwzdREk5K6pluAW0D6tNRMJQ== X-Received: by 2002:ad4:4468:: with SMTP id s8mr528201qvt.115.1586192099781; Mon, 06 Apr 2020 09:54:59 -0700 (PDT) Received: from nimloth.alvh.no-ip.org ([190.95.18.252]) by smtp.gmail.com with ESMTPSA id f1sm13978978qkl.72.2020.04.06.09.54.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Apr 2020 09:54:58 -0700 (PDT) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id 9E5F0300A04; Mon, 6 Apr 2020 12:54:56 -0400 (-04) Date: Mon, 6 Apr 2020 12:54:56 -0400 From: Alvaro Herrera To: Kyotaro Horiguchi Cc: jgdr@dalibo.com, andres@anarazel.de, michael@paquier.xyz, 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: <20200406165456.GA4951@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200406.185027.648866525989475817.horikyota.ntt@gmail.com> 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-Apr-06, Kyotaro Horiguchi wrote: > > * Andres complained that the "distance" column was not a great value to > > expose (20171106132050.6apzynxrqrzghb4r@alap3.anarazel.de). That's > > right: it changes both by the insertion LSN as well as the slot's > > consumption. Maybe we can expose the earliest live LSN (start of the > > earliest segment?) as a new column. It'll be the same for all slots, > > I suppose, but we don't care, do we? > > I don't care as far as users can calculate the "remain" of individual > slots (that is, how far the current LSN can advance before the slot > loses data). But the "earliest live LSN (EL-LSN) is really not > relevant to the safeness of each slot. The distance from EL-LSN to > restart_lsn or the current LSN doesn't generally suggest the safeness > of individual slots. The only relevance would be if the distance from > EL-LSN to the current LSN is close to max_slot_wal_keep_size, the most > lagged slot could die in a short term. Thanks for the revised version. Please note that you forgot to "git add" the test file, to it's not in the patch. I'm reviewing the patch now. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services