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 1gMC5q-0007sc-FK for pgsql-hackers@arkaria.postgresql.org; Mon, 12 Nov 2018 13:17:30 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gMC5o-0007E4-Uk for pgsql-hackers@arkaria.postgresql.org; Mon, 12 Nov 2018 13:17:28 +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 1gMC5n-0007Dx-Sx for pgsql-hackers@lists.postgresql.org; Mon, 12 Nov 2018 13:17:28 +0000 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gMC5h-0001dR-92 for pgsql-hackers@postgresql.org; Mon, 12 Nov 2018 13:17:26 +0000 Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.west.internal (Postfix) with ESMTP id 5404AC3B; Mon, 12 Nov 2018 08:17:19 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute7.internal (MEProxy); Mon, 12 Nov 2018 08:17:19 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=YNyoKU176hFj1QX7XhBPM5NX4InXNdyBA/8EM16Ew Kk=; b=trzD9aKPlslN7UnhjEc0szJkNQX9rlNzi+4d1+Hkk5MtFA++YZedvTHn8 nEsLs629JI2kbGJPG9x3uGkm8YAYh8mQXJJIAe/S2dZ5inHGt5FYgTH1GS6IS+Sy CKaPYdyEZV2+BNvy8N47APQVnmJ1QHPoZlzKPtfPIzRmPp03+fb1NmkYlCaqs/9a PKRn4PIYG6BBVyBTRbaFRmA+Whqo2qQGKdTPLDsWsqGe9EgIL4pYFu/H5/1jas6x FKTULY2irJrx/QW0xotuNxdtSarXuX4azDelT/cw/xr/0wSukiefQTaDp1knfh4s hZ9FJiHWFcBbIV87FpdlC2XL3TFFw== X-ME-Sender: X-ME-Proxy: Received: from april.pezone.net (p5df295f3.dip0.t-ipconnect.de [93.242.149.243]) by mail.messagingengine.com (Postfix) with ESMTPA id A8163102E0; Mon, 12 Nov 2018 08:17:17 -0500 (EST) Subject: Re: Continue work on changes to recovery.conf API To: Sergei Kornilov References: <607741529606767@web3g.yandex.ru> <594281529606887@web2j.yandex.ru> <3595211530445522@web17o.yandex.ru> <64b6e400-74fa-3b30-5bcf-4d6a1facbf27@2ndquadrant.com> <1312381535557435@iva1-a2ffb02749cf.qloud-c.yandex.net> <22e02b05-cd56-6a6b-962d-6d35995827a5@2ndquadrant.com> <1876591538256580@iva1-5148b5385b62.qloud-c.yandex.net> <943181539360922@iva4-24c534b4e3ac.qloud-c.yandex.net> <32159921540906216@myt5-9da6df248f4a.qloud-c.yandex.net> From: Peter Eisentraut Openpgp: preference=signencrypt Autocrypt: addr=peter.eisentraut@2ndquadrant.com; prefer-encrypt=mutual; keydata= xsFNBFUUt6kBEADZd9NNTBJbHmAXXJgPGOdd6Q73l80oifIVgn2tRxP9dYkCfTlo/yLqbKTl JNqTcyM6XrJDnB2sMEUGYCewYZXl+9C4bBJWyNqcEI1ae9u71vEq/fknFLArJ+2wN+f7QuRx Q8d94ZJAiJQ5g3fNk2HVeedCQCKP5dCzU+ZLt2dbsx1PDZLjTO9gf+JswWuGFb5wY5PZVM5V hq66Xk7ZJzHuARacza2RT7J2fkMmQBY+kr7L98Perb0GhafnlhXB0PvUB+N3xpmggMfwuhTu BngS/G/r3GvemxJuFxouw8xsMqrsfdksJ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r+12ZOb5dEKvaG4kjC4kaJ/TLbuBhVANcXkC90yp0AOZLs/cB1Dj OAXno/RUUruJ3r27a+pFv768UAi9QWcdw58yPxreMNMLqAgsS9oTHwHfGNWcB2dJ4UW+GMLJ hTf9TjQ2f+N/sIx5XMQ9pYw6CAJMK29qPx6/ZayrPxf22EXf0D3zTwIEZgwfSkynFVwV25L7 awQq60fifdMYheSxq7GbhpsixmcD+e161cCmLIt75YDt5bQ0B1yf7EmxG8n7pGZAOM6LoNsU fkSldba5XVwh8LuN5mK0nQBELGW6Os4TDq4REggLpfcvFC215zpuo0iCGnmE/Bns4nowqUSP u4tkWL+nxW4qgv8wo8HJ52jd79EJ8iqfIBoidBfy9AIUiEUApGQzWPu6yWcI8fY0rN5D+tc+ Yw1Zt6Mm+huYJpgCRsTcfzEcahnBn521CWcWvhW1ff3KFileFMtNmnBBhMncmRKHphtTKEpN 3jI= Organization: 2ndQuadrant Cc: PostgreSQL mailing lists Message-ID: <51a6446c-c2b6-b653-c9f5-da38e23ddd9d@2ndquadrant.com> Date: Mon, 12 Nov 2018 14:17:15 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <32159921540906216@myt5-9da6df248f4a.qloud-c.yandex.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 30/10/2018 14:30, Sergei Kornilov wrote: > I attached new version of this patch due merge conflict with pg_promote function. This patch looks pretty good to me functionality-wise. There are some code details to work through, listed below. In this review, I'm skipping over your documentation changes. It seems you have found all the places that mention recovery.conf and updated them adequately. But I think in some cases we will need to take a few steps back and reword a paragraph or section altogether. For example, there will no longer be a reason for recovery-config.sgml to be a separate chapter if it's all part of the main GUC system. We can work through that later. Code discussion: - useless whitespace change in xlog.c - I think we can drop logRecoveryParameters(). Users can now inspect those parameters using the normal GUC mechanisms. (They were all DEBUG2 anyway, so it's not like many users will be missing this.) Then you can also drop RecoveryTargetActionText(). - Why introduce MAXRESTOREPOINTNAMELEN? If you think this is useful, then we could do it as a separate patch. - Make the help text change in pg_archivecleanup.c similar to pg_standby.c. - In pg_basebackup.c, duplicate defines PG_AUTOCONF_FILENAME and STANDBY_SIGNAL_FILE. See that you can put those into a header file somewhere. - This stuff breaks translation strings: printf(_(" -R, --write-recovery-conf\n" - " write recovery.conf for replication\n")); + " append replication config to " PG_AUTOCONF_FILENAME "\n" + " and place " STANDBY_SIGNAL_FILE " file\n")); Use %s placeholders, or better yet replace it in a more compact way. - The test function $node_standby->request_standby_mode() could use a better name. How about set_ instead of request_ ? - New string GUCs should have "" instead of NULL as their default in guc.c. (Not sure whether that is strictly necessary, but it seems good to be consistent.) - Help strings in guc.c should end with a period. - Renaming the promote and fallback_promote files seems unnecessary for this patch, and I would take it out. Otherwise, the change in pg_ctl.c is out of date with the comment above it. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services