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 1jTy3i-0007wF-85 for pgsql-hackers@arkaria.postgresql.org; Thu, 30 Apr 2020 01:32:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jTy3g-0004tu-I0 for pgsql-hackers@arkaria.postgresql.org; Thu, 30 Apr 2020 01:32:12 +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 1jTy3g-0004sX-7a for pgsql-hackers@lists.postgresql.org; Thu, 30 Apr 2020 01:32:12 +0000 Received: from mail-qt1-x843.google.com ([2607:f8b0:4864:20::843]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jTy3Z-0007hl-DP for pgsql-hackers@lists.postgresql.org; Thu, 30 Apr 2020 01:32:10 +0000 Received: by mail-qt1-x843.google.com with SMTP id o10so3721041qtr.6 for ; Wed, 29 Apr 2020 18:32:05 -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=IgA9g5rdPttzVKcOpQnlnvHCyZIe6kMGrfwDKsuknek=; b=OH8imh6HQ4fzfQ9+/DNjwafJ4VVSjGHbLbhnnRsrz+1r3kpbj4Rx/4TEcOEL0Don79 yRF2C2rE87PZpGNQE1dzYMOYj0Fqe5JgPTw3zEeLYyZecLVQLmnftkuFRMpN0bvBOQ9Y gzKVUYd5uxXnbQpPAwiSBfY7vWmxn3fhj1+KvAAz5LbM0SYTsm+2wrflIP8Tr/AH0B7Q 2+Cw1wzh/s1wXOi8ajLe8PohtJO54kW0K6Rj+v3eCV+D4lKVMZ5dMHdP0lUmKpB7VLnt B8RsvxxTwsOfykRYsyBxXqjIBfYTlef41mtc0la3ti1xBIqTEQUcaOwdJg/Sj3+A8mL3 k/qA== 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=IgA9g5rdPttzVKcOpQnlnvHCyZIe6kMGrfwDKsuknek=; b=WhgDBbvtDjIAvwrwe2pzPS/xBmp0ebm0377CU6CZj23IFNWImyeAoHj3RDLcwvNZVL /lZu7KT6BiSWKLebFX9XjvzKgZZ6denP1IhqM9qTbh3+E8oEr8ooSiluvJb9U+IOZ2Ki SVX5HUesXWtNO0IrCGTaV+rhEjYHoBiIAJwcCep0VPBSsdCKLffQ0+nP3NsXUXfGrr7m fvwPBDgZTTredxfvp5JOSfO+1qTmfMCZXjpoEWiurTTULkeSsmaXAw+k0W9rhhQbt/3r PmQ5I26aasoRJLNHYKsG71W95NC+/80fGn9+FpT1sCTlMc5n9CkCloH0za1k/M7x7qZ8 HtTQ== X-Gm-Message-State: AGi0Puan0GFGwjTitTrIJXLgFplNY0UJcdzuyn7c8mh510ZEyp/MROyF 3R6S3TA4m68L4hN8KVgVhTp2LA== X-Google-Smtp-Source: APiQypIL2hldv3OhbRbVFkvd893qsqkX6/hM5iui1HHxhPvTzbGou6BXEFkPhSyFG3Io72plmKvmIQ== X-Received: by 2002:ac8:5304:: with SMTP id t4mr1296154qtn.250.1588210324553; Wed, 29 Apr 2020 18:32:04 -0700 (PDT) Received: from nimloth.alvh.no-ip.org ([190.95.18.252]) by smtp.gmail.com with ESMTPSA id c41sm842123qta.96.2020.04.29.18.32.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Apr 2020 18:32:04 -0700 (PDT) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id 18D28300819; Wed, 29 Apr 2020 21:32:02 -0400 (-04) Date: Wed, 29 Apr 2020 21:32:02 -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: <20200430013202.GA22210@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200430.102520.937018442080739049.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-30, Kyotaro Horiguchi wrote: > At Tue, 28 Apr 2020 20:47:10 -0400, Alvaro Herrera wrote in > > /* > > * After the sanity checks in CreateDecodingContext, make sure the > > * restart_lsn is valid. Avoid "cannot get changes" wording in this > > * errmsg because that'd be confusingly ambiguous about no changes > > * being available. > > */ > > if (XLogRecPtrIsInvalid(MyReplicationSlot->data.restart_lsn)) > > ereport(ERROR, > > (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), > > errmsg("can no longer get changes from replication slot \"%s\"", > > NameStr(*name)), > > errdetail("This slot has never previously reserved WAL, or has been invalidated."))); > > > > I hope this is sufficiently clear, but if not, feel free to nudge me and > > we can discuss it further. > > That somewhat sounds odd that 'we "no longer" get changes from "never > previously reserved" slots'. More than that, I think we don't reach > there for physical slots, since CreateDecodingContext doesn't accept a > physical slot and ERRORs out. (That is the reason for the location of > the checking.) Oh, right, so we could reword the errdetail to just "This slot has been invalidated." -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services