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.92) (envelope-from ) id 1j7nPP-00052A-LX for pgsql-hackers@arkaria.postgresql.org; Fri, 28 Feb 2020 21:42: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 1j7nPN-0006GT-GI for pgsql-hackers@arkaria.postgresql.org; Fri, 28 Feb 2020 21:42:57 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1j7nLS-0005jy-LX for pgsql-hackers@lists.postgresql.org; Fri, 28 Feb 2020 21:38:54 +0000 Received: from mail-yw1-xc43.google.com ([2607:f8b0:4864:20::c43]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1j7nLP-0003Nw-So for pgsql-hackers@postgresql.org; Fri, 28 Feb 2020 21:38:54 +0000 Received: by mail-yw1-xc43.google.com with SMTP id o186so506513ywc.1 for ; Fri, 28 Feb 2020 13:38:51 -0800 (PST) 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=1qKCZfZeRtQn8WSA90chBciaF5tKZ6LufQtPPk5fX4Y=; b=WRR9GQT3yCKq4HdzAqXRWZzsNi4UxDPIavKP1adtIubrGr2sc7lAaDIXKAk/kwe627 qnTVsKjjaeSbityczPKLexSvSEa064b7rycI59UkeYcb1ulDFj40sDfyJaFzkloroCPo PUaNXd4+P2FvYwD8WQrwV0Aa400HNDyHJ0C5V7BSGlQ1oDTFZUh5VHmO3Tn83ULlrDFk OQwoZg/dAL46l76Q20hr4Q6DZWf8cd/viesUQeVXSZfpNKoBNipF8omcXZ+rHGeRLwTJ /013+SLT/9yKl7mT/mkLCh28V0izfcROqOquyC560RkTVmj5VvqleRqtRNLK3PgDo0gw fZkQ== 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=1qKCZfZeRtQn8WSA90chBciaF5tKZ6LufQtPPk5fX4Y=; b=imumXG9G3psf12yz7ywCi0kv1TqiNQJlMxjsPXdk5G3YKRgSGKuqlqc3qGwM5XP/HB lxfMElslBJoelP07NN60omdksaVvC+1iKFbEU4hyySfazmE4OVET+xf3eVHUD/YP8oM6 08efKYSkuaTiy7NJ6FNuzplJGxAfS4bo9HvcDa82jm/3l0AJzZjPegw7y7f3FlW2Z832 BVRfz6QY62R1OKiLePnIva/ck8i4BO2GG5kQBcM90yGGaUFLImjdUxrysH6X/CZY0SP5 mAUVeNsUk6Zk5SK9aCUB8FdyXEfJP4B/Ht+PJlqTdlUGh9psRXmBzNABQkubbKjnVrWx 6v2A== X-Gm-Message-State: APjAAAVaOCg1rbwBF5cwDOjfM08xU0Ah6PELVzVMMfu67WDXK2AB0WUU vP5C8muekQo+kfiu4ovXgOpa3w== X-Google-Smtp-Source: APXvYqw1nCNf6JcruSgNaqWy8akq+FCU6w+cWMx6b8RZZx35sY+cKucxdYwdkTbc0ZJ10LtAyXDRTw== X-Received: by 2002:a25:d282:: with SMTP id j124mr5377837ybg.197.1582925930693; Fri, 28 Feb 2020 13:38:50 -0800 (PST) Received: from nimloth.alvh.no-ip.org ([199.116.115.139]) by smtp.gmail.com with ESMTPSA id a124sm4558110ywc.104.2020.02.28.13.38.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Feb 2020 13:38:47 -0800 (PST) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id A8EBB3007D2; Fri, 28 Feb 2020 12:33:31 -0300 (-03) Date: Fri, 28 Feb 2020 12:33:31 -0300 From: Alvaro Herrera To: Peter Eisentraut Cc: pgsql-hackers Subject: Re: Improve handling of parameter differences in physical replication Message-ID: <20200228153331.GA31634@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <4ad69a4c-cc9b-0dfe-0352-8b1b0cd36c7b@2ndquadrant.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-Feb-27, Peter Eisentraut wrote: > So this patch relaxes this a bit. Upon receipt of > XLOG_PARAMETER_CHANGE, we still check the settings but only issue a > warning and set a global flag if there is a problem. Then when we > actually hit the resource issue and the flag was set, we issue another > warning message with relevant information. Additionally, at that > point we pause recovery, so a hot standby remains usable. Hmm, so what is the actual end-user behavior? As I read the code, we first send the WARNING, then pause recovery until the user resumes replication; at that point we raise the original error. Presumably, at that point the startup process terminates and is relaunched, and replay continues normally. Is that it? I think if the startup process terminates because of the original error, after it is unpaused, postmaster will get that as a signal to do a crash-recovery cycle, closing all existing connections. Is that right? If so, it would be worth improving that (possibly by adding a sigsetjmp() block) to avoid the disruption. Thanks, -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services