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 1jJP3f-00030p-Hb for pgsql-hackers@arkaria.postgresql.org; Tue, 31 Mar 2020 22:08:31 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jJP38-0002jb-3k for pgsql-hackers@arkaria.postgresql.org; Tue, 31 Mar 2020 22:07:58 +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 1jJP37-0002jU-T3 for pgsql-hackers@lists.postgresql.org; Tue, 31 Mar 2020 22:07:57 +0000 Received: from mail-qt1-x842.google.com ([2607:f8b0:4864:20::842]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jJP35-0008M0-8g for pgsql-hackers@lists.postgresql.org; Tue, 31 Mar 2020 22:07:57 +0000 Received: by mail-qt1-x842.google.com with SMTP id c14so19955223qtp.0 for ; Tue, 31 Mar 2020 15:07:54 -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=9JsCu9P4hMRhW372PTOY9YK9vbt1tB3oN/0kMHVcLrc=; b=jxuZbAx8ZY2D0oBhkCP0rhNliWt0VKDq4rUx40YaBDdb1K6mN3ax/Wa9eSi/MvoJRk 214k6Us5frGn3Ql7GLwHXuiM1Xz6ekfsMxI8ORH48pLMZmN11vwP44gwnAodyJhLqMlg Ct6azZjEV5vQUn3Wi3CZIb8ecy6BmJqaZ4fr8ueTZscfeduFJNBUszxRjmKFraQi4yii IJE6IJDw9w7Gzojp+0de78jsly5FxrOu+iTfii99JwQBLNw8a4fd0/zHVBybpj7IYweN j0/3EDf0K4/Bq2K5VRjf15L2kj+tUrPMtJLJq/D6pfxQ2AodizFceIAJpiw4VHBfrvek T8kA== 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=9JsCu9P4hMRhW372PTOY9YK9vbt1tB3oN/0kMHVcLrc=; b=oVL7JzlxmwPez+dEKo8+uQkZ0QPcqvHfxzQnpF9LPg/k6m+4vNCnqtvX+DrpUMKYgM 0nGKU7ozV4thZYk9S9mh9A1g4jwLA/ZDVh3sAYRIteSJ0/wgDF4wVz7MneN0K1suh5UH pmQyNPZtJO8z8yME1PpnD7fKu7104L/DV/9Y+cukVb4JC2YLVGfAjvu9eq44VWJBH0tv YAWKJndCVHCr9Y+UEcWNe2rtgk6UvBMcuBhvH5ccUQOvz1DzwDaVNu7fgllH0xxxCB56 mECTxu2+WJWcilMjGfMK5gbVEKmL9zE09mMYqzbZnfdn8AFoR+qpjif8h0BD18UbJ79k 3INA== X-Gm-Message-State: ANhLgQ20i16urimol8nwP3LJrHxIK6oK0W9o45fnn6pcpvmB8k0lq/K+ rOm4AgR0VftcqFuab8TDq2YTzA== X-Google-Smtp-Source: ADFU+vue0jAqJ1kjMGxxvSENj9K8dUZ0Mwv8S8JM+pWQWEM7V89q94ywAAMSgmm438QuUJdTS36Pfw== X-Received: by 2002:aed:2207:: with SMTP id n7mr7563696qtc.132.1585692472693; Tue, 31 Mar 2020 15:07:52 -0700 (PDT) Received: from nimloth.alvh.no-ip.org ([190.95.18.252]) by smtp.gmail.com with ESMTPSA id s63sm193743qkh.64.2020.03.31.15.07.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Mar 2020 15:07:52 -0700 (PDT) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id 066273009FE; Tue, 31 Mar 2020 19:07:50 -0300 (-03) Date: Tue, 31 Mar 2020 19:07:49 -0300 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: <20200331220749.GA10008@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200331220257.GA9763@alvherre.pgsql> 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-Mar-31, Alvaro Herrera wrote: > I think we should kill(SIGTERM) the walsender using the slot (slot->active_pid), > then acquire the slot and set it to some state indicating that it is now > useless, no longer reserving WAL; so when the walsender is restarted, it > will find the slot cannot be used any longer. Ah, I see ioguix already pointed this out and the response was that the walsender stops by itself. Hmm. I suppose this works too ... it seems a bit fragile, but maybe I'm too sensitive. Do we have other opinions on this point? -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services