Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1haldj-00050V-CD for pgsql-hackers@arkaria.postgresql.org; Tue, 11 Jun 2019 18:36:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1haldi-0008Vm-8V for pgsql-hackers@arkaria.postgresql.org; Tue, 11 Jun 2019 18:36:58 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1haldh-0008Vf-Mw for pgsql-hackers@lists.postgresql.org; Tue, 11 Jun 2019 18:36:58 +0000 Received: from mail-qt1-x843.google.com ([2607:f8b0:4864:20::843]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1halde-0004zg-NE for pgsql-hackers@postgresql.org; Tue, 11 Jun 2019 18:36:56 +0000 Received: by mail-qt1-x843.google.com with SMTP id j19so15739008qtr.12 for ; Tue, 11 Jun 2019 11:36: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=HXSq4ZtCHdj6AyeJ/0xQ/s5mB+4g8DtWJKcgkoHOEg4=; b=adbemIfI0kETI46kamS9ppdcoWXMn3IuIE/H0Xg6zjsLSbaTeQw2Qb1if6xC999ZHr Qpv+DIn09tYCndoSp4v5tJjtciqALEN+VSyEJbsb4gWc0fWbvdfeb/tZMoaqQnExkSSs BKXTHr4uc7HZPoucdUDhEn2Y7NfjfubOJJE/spiEw/iUl6QHfWapHHkgKX+56ueWKAt0 yINn2GEzC5WWouvwqBvC7yQ+yGW6UU/uwmtOU4C3E8qy+AVDoJwCcnwB8FfTJPeZVQzh U4felAVMkaOTqPeAGCSm3Zk5Hs0uRatQlPbsQLb39jBuU2kyN0oWBXNyjbZYRUVLNk4U IitA== 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=HXSq4ZtCHdj6AyeJ/0xQ/s5mB+4g8DtWJKcgkoHOEg4=; b=mIjXMeX/zF8WuxcRzMm98v+xt4ggeDjQRQiWMz5gCwvwI/JKGGntFndOTC7Kze92d9 xN+zZ6BfQLPd8u40uKjqf1D68a+Fx9fvTADksNc2LG/PXXO/fvcFTCDEkFr8nMIm48dZ bVnAAs7IyyZR1K6WLMwLSeYkbfNbL7eBEDLU91RTJ7Rg1TT94O3ZKWMuF3BUH91mtXCk k+lntJB3oz3RJdUDyKfIWAp4mvFjmlTh7qcH4Xq2crIy5yyaAfw6P38r13nWZ5elnTJY ilwaYVmuB94Ew0mIGm/bu+8jX6c+4+nRTT0fpba5gK9LLzvv/35SdPgtF2fB8ThUpya1 44dw== X-Gm-Message-State: APjAAAUj76zoMUG9wUggG/yCd6uwvDjQKan2QKBxO9td6aZVbknKxP9Y kM0ZGsB1NBViMaCriWJC4rFuKw== X-Google-Smtp-Source: APXvYqzBvbJFn6VkByGw1C6fM6IyeWQqWWX4EwdbWhv1ZTsgvPrvMxqLXk5Csm/rkXxIQCVqFIGiQA== X-Received: by 2002:a0c:87bd:: with SMTP id 58mr9364441qvj.62.1560278213726; Tue, 11 Jun 2019 11:36:53 -0700 (PDT) Received: from nimloth.alvh.no-ip.org ([190.121.29.3]) by smtp.gmail.com with ESMTPSA id m5sm8609995qke.25.2019.06.11.11.36.53 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 11 Jun 2019 11:36:53 -0700 (PDT) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id 8706C120CB3; Tue, 11 Jun 2019 14:36:50 -0400 (-04) Date: Tue, 11 Jun 2019 14:36:50 -0400 From: Alvaro Herrera To: Andres Freund Cc: Robert Haas , Sergei Kornilov , Amit Khandekar , tushar , Petr Jelinek , Craig Ringer , Petr Jelinek , pgsql-hackers Subject: Re: Minimal logical decoding on standbys Message-ID: <20190611183650.GA25310@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190523160023.cpi7cyozbthflx32@alap3.anarazel.de> User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2019-May-23, Andres Freund wrote: > On 2019-05-23 09:37:50 -0400, Robert Haas wrote: > > On Thu, May 23, 2019 at 9:30 AM Sergei Kornilov wrote: > > > > wal_level is PGC_POSTMASTER. > > > > > > But primary can be restarted without restart on standby. We require wal_level replica or highter (currently only logical) on standby. So online change from logical to replica wal_level is possible on standby's controlfile. > > > > That's true, but Amit's scenario involved a change in wal_level during > > the execution of pg_create_logical_replication_slot(), which I think > > can't happen. > > I don't see why not - we're talking about the wal_level in the WAL > stream, not the setting on the standby. And that can change during the > execution of pg_create_logical_replication_slot(), if a PARAMTER_CHANGE > record is replayed. I don't think it's actually a problem, as I > outlined in my response to Amit, though. I don't know if this is directly relevant, but in commit_ts.c we go to great lengths to ensure that things continue to work across restarts and changes of the GUC in the primary, by decoupling activation and deactivation of the module from start-time initialization. Maybe that idea is applicable for this too? -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services