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 1kTSvg-0003f0-5O for pgsql-hackers@arkaria.postgresql.org; Fri, 16 Oct 2020 16:50:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kTSve-0008Pc-Fn for pgsql-hackers@arkaria.postgresql.org; Fri, 16 Oct 2020 16:50:06 +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 1kTSve-0008OD-4L for pgsql-hackers@lists.postgresql.org; Fri, 16 Oct 2020 16:50:06 +0000 Received: from mail.postgrespro.ru ([93.174.131.139]) by magus.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kTSvb-0000eN-V9 for pgsql-hackers@postgresql.org; Fri, 16 Oct 2020 16:50:05 +0000 Received: from mail.postgrespro.ru (cyclops.postgrespro.ru [93.174.131.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mail.postgrespro.ru (Postfix) with ESMTPSA id 86E9321C3AAB; Fri, 16 Oct 2020 19:50:01 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mail; t=1602867001; bh=PemTK2Eb80K70r2zE0BUAwnsnNP8evIfso4t6L9zoSE=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=M/5QsP/paoc5go3utwKxBWOySjupI3Zefy6jyfkmD//ZPNGWvqixLBCrk+apESDhM xVwi7XhZwW58gANZ0HL36z4S7TqjtAs6Jnq96R7WhW0loPtsVtLtbqCPV92I20U4hF RLPbrnjhGCY0VwKks2vOi5qFf+ZcnXWsKgBCn67k= MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=_90a5f81e4eaf5a86b856f9219b591d42" Content-Transfer-Encoding: 7bit Date: Fri, 16 Oct 2020 19:50:01 +0300 From: Maxim Orlov To: Alvaro Herrera Cc: Sergei Kornilov , Michael Paquier , Tomas Vondra , Kyotaro Horiguchi , andres@anarazel.de, david@pgmasters.net, pgsql-hackers@postgresql.org, Peter Eisentraut Subject: Re: allow online change primary_conninfo In-Reply-To: <20200327233911.GA30735@alvherre.pgsql> References: <20200327233911.GA30735@alvherre.pgsql> User-Agent: Roundcube Webmail/1.4.0 Message-ID: <4cd4107ed423c8757636ec04342457bf@postgrespro.ru> X-Sender: m.orlov@postgrespro.ru List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --=_90a5f81e4eaf5a86b856f9219b591d42 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; format=flowed On 2020-03-28 02:39, Alvaro Herrera wrote: > On 2020-Mar-27, Alvaro Herrera wrote: > >> On 2020-Mar-27, Alvaro Herrera wrote: >> >> > I pushed the wal_receiver_create_temp_slot bugfix, because I realized >> > after looking for long enough at WalReceiverMain() that the code was >> > beyond saving. I'll be pushing the rest of this later today. >> >> So here's the next one. I still have to go over the doc changes here, >> but at least the tests are passing for me. > > Pushed with some documentation tweaks. > > Many thanks for working on this! Nice work! What do you think of possibility to add restore_command? Is it a good idea to make a restore_command to be reloadable via SUGHUP too? On the one hand it looks reasonable since primary_conninfo got such ability. On the other hand we don't exactly know whether the actual process after reload config would use "new" command or "old" since it may take a long time to finish running old command (in case of scp or smth). Also setting faulty restore_command lead to server termination, which is rather unexpectedly. If anyone makes some minor typo in restore_command, say write restore_command='cp1 /mnt/srv/%f %p' instead of restore_command='cp /mnt/srv/%f %p' and do SELECT pg_reload_conf() then server will terminate. Do you consider this feature useful? Any suggestions? --- Best regards, Maxim Orlov. --=_90a5f81e4eaf5a86b856f9219b591d42 Content-Transfer-Encoding: base64 Content-Type: text/x-diff; name=restore_command-sighup.patch Content-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