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 1jhcwS-0007pu-IL for pgsql-hackers@arkaria.postgresql.org; Sat, 06 Jun 2020 17:49:12 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jhcwQ-0007VY-7U for pgsql-hackers@arkaria.postgresql.org; Sat, 06 Jun 2020 17:49:10 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jhcwP-0007RR-Ah for pgsql-hackers@lists.postgresql.org; Sat, 06 Jun 2020 17:49:10 +0000 Received: from wforward5-smtp.messagingengine.com ([64.147.123.35]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jhcwK-0002HL-Gb for pgsql-hackers@postgresql.org; Sat, 06 Jun 2020 17:49:08 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailforward.west.internal (Postfix) with ESMTP id 37CCF69D; Sat, 6 Jun 2020 13:49:02 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Sat, 06 Jun 2020 13:49:03 -0400 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=fm3; bh=BclB0voITMhnKnfk/hMM1aNtrjjuq10IHBr8Mu/AJ Qk=; b=FvOX7mVPeEyzWxo0Qk0Y3Rv7xhXACkK6a406qBnuW961Zu/GE1kWj+qYn g83Rcqw7vd7fM8itYAeh1Eq6N6GwsoBeMRHR965KHh310nlkp/P05TRAIn31Luce gb33z9SeoMW1NJMDg72CaRhQHSLPqYTO5dLDgtjokUJKmiCJKhf3L1h4/CubLiUX QwIlIPM23mxAxGukgcAjhNs5q1txaMY22sP16vA1Gi0pzdKazOLCcCOJvMIDMaUp VxTeoUjVHU0TWJBX+VmOfWriNuL3r0xEkvpjz3eLD9hzggp1EGhGJoxy+G2FfwFV VKgHuFm20dVUqfR2vY+cBbhlcbtUQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrudeghedguddvvdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefuvfhfhfhokffffgggjggtgfesthejredttdefheenucfhrhhomheprfgv thgvrhcugfhishgvnhhtrhgruhhtuceophgvthgvrhdrvghishgvnhhtrhgruhhtsedvnh guqhhurggurhgrnhhtrdgtohhmqeenucggtffrrghtthgvrhhnpeevueetledvuedugffg vedugeduhfdvkeegueefhfdtgeeuudeghfehueegfefhieenucffohhmrghinhepvdhnug hquhgrughrrghnthdrtghomhenucfkphepleefrddvgeefrdekvddrvdegieenucevlhhu shhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehpvghtvghrrdgvih hsvghnthhrrghuthesvdhnughquhgrughrrghnthdrtghomh X-ME-Proxy: Received: from april.pezone.net (p5df352f6.dip0.t-ipconnect.de [93.243.82.246]) by mail.messagingengine.com (Postfix) with ESMTPA id 7A1493280059; Sat, 6 Jun 2020 13:48:58 -0400 (EDT) Subject: Re: [Patch] pg_rewind: options to use restore_command from recovery.conf or command line To: Michael Paquier , Alexey Kondratov References: <20200326073458.GJ1471@paquier.xyz> <20200326215636.GA18768@alvherre.pgsql> <20200326224729.GB1836@paquier.xyz> <20200330015648.GA43995@paquier.xyz> <750ea0322cd68c0973d9ff248909811d@postgrespro.ru> <20200331064821.GA1549@paquier.xyz> Cc: Alvaro Herrera , Alexander Korotkov , Kuntal Ghosh , Liudmila Mantrova , Thomas Munro , Andrey Borodin , David Steele , Andres Freund , PostgreSQL-development , Dmitry Dolgov <9erthalion6@gmail.com>, vladimirlesk@yandex-team.ru, dsarafan@yandex-team.ru From: Peter Eisentraut Organization: 2ndQuadrant Message-ID: Date: Sat, 6 Jun 2020 19:48:57 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20200331064821.GA1549@paquier.xyz> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2020-03-31 08:48, Michael Paquier wrote: > On Mon, Mar 30, 2020 at 05:00:01PM +0300, Alexey Kondratov wrote: >> What do think about adding following sanity check into xlogarchive.c? >> >> +#ifdef FRONTEND >> +#error "This file is not expected to be compiled for frontend code" >> +#endif >> >> It would prevent someone from adding typedefs and any other common >> definitions into xlogarchive.h in the future, leading to the accidental >> inclusion of both xlogarchive.h and fe_archive.h in the same time. > I don't see much the point as this would fail to compile anyway, and > that's not project-style. Note that we have already a clear > separation here between the backend and the frontend code here as > xlogarchive.h is backend-only and fe_archive.h is frontend-only. Why is fe_archive.c in src/common/ and not in src/fe_utils/? It is not "common" to frontend and backend. It actually defines functions that clash with functions in the backend, so this seems doubly wrong. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services