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 1krZND-00068F-8L for pgsql-bugs@arkaria.postgresql.org; Tue, 22 Dec 2020 04:34: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 1krZN9-0005i1-SW for pgsql-bugs@arkaria.postgresql.org; Tue, 22 Dec 2020 04:34:07 +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 1krZN8-0005ho-Il for pgsql-bugs@lists.postgresql.org; Tue, 22 Dec 2020 04:34:07 +0000 Received: from [64.147.123.24] (helo=wout1-smtp.messagingengine.com) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1krZN1-0004xE-23 for pgsql-bugs@lists.postgresql.org; Tue, 22 Dec 2020 04:34:04 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 4205BD40; Mon, 21 Dec 2020 23:33:47 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Mon, 21 Dec 2020 23:33:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= date:from:to:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm3; bh=/9aw2baaOV6tEIOYEnynoSoZOjs QmcG7crnOAt8viZU=; b=Z66fjTUQBwmwqKJQ2ovjwog6MkRU7V1RaFQPqVoLnFJ U5gmE9YhY7/snuKmeF9BW+o3NlcOQ457ed+3f8gSTaMXV+2/8WLzYaa+J2Qz2QCU TYLNn80SzRcaQEfaAOIcRCTpF5apPFPGvPHB2U57MoWne6/M8mMmtZLCssv7g9DH 46Dx0l7mvxJyjBBN4nhAZFDDPC/fLs6xuM3dMilukx5CEKa1Yve4K97Jv+kwKIhd Aws+IzDwL7LjexszQiPgXTTCXbLNJP6ppBQYriqRXYFZ5qxd5ur4z6zC2kScUbCv oYBcHnz3SqSuc3qs7nsrDyAUFQYyq5zfutNr7mUX2Bw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=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=/9aw2b aaOV6tEIOYEnynoSoZOjsQmcG7crnOAt8viZU=; b=A2vJk2uhkOAHr5VjY8R8rr gwfgXH9BkLjAjRsvd8A1e6pjXpbeJi9JISOVVIky86uB8pOSl3tpGeYtUqBep721 hCs1JmXCUm66+vPgpxez7+per1iF7DGuzxNxDBQDAsu7NC4bO6oPsy7wfd2e8dYc MrkEFr1c/azqnbntwdkVF4KjczG0Dj+DQk0w3NbyXql8xrtKHIH8lBwroMyD8aH3 FwCUbqsD6WVh35SX115T/UPvuENo8O21jOQdqpyQD7lyH9MH6O/vJn+3GaW+XqhH /M52qvNyfDwIaSVHtpfnEcOaZIpBZG4LoMLiM97SbcGzUMSM8ARJ4vKAYrRbAKoQ == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrvddtfedgjeehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucgfrhhlucfvnfffucdljedtmdenucfjughrpeffhf fvuffkfhggtggujgesghdtreertddtvdenucfhrhhomhepofhitghhrggvlhcurfgrqhhu ihgvrhcuoehmihgthhgrvghlsehprghquhhivghrrdighiiiqeenucggtffrrghtthgvrh hnpedvgeduuefhtdeuleettdevjeehheeiveeuieegleetgeeljeelieeuieehgeevhfen ucfkphepudduuddruddtvddrudektddrudekheenucevlhhushhtvghrufhiiigvpedtne curfgrrhgrmhepmhgrihhlfhhrohhmpehmihgthhgrvghlsehprghquhhivghrrdighiii X-ME-Proxy: Received: from paquier.xyz (ee0822lan1.rev.em-net.ne.jp [111.102.180.185]) by mail.messagingengine.com (Postfix) with ESMTPA id 7D1BE240057; Mon, 21 Dec 2020 23:33:45 -0500 (EST) Date: Tue, 22 Dec 2020 13:33:41 +0900 From: Michael Paquier To: edwin.polkerman@splendiddata.com, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #16783: pg_rewind: option -c does not work when configuration files are outside data directory Message-ID: References: <16783-6adba0a6c08728e8@postgresql.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="sE9RVuJe7Fd5Q2Z0" Content-Disposition: inline In-Reply-To: <16783-6adba0a6c08728e8@postgresql.org> X-Host-Lookup-Failed: Reverse DNS lookup failed for 64.147.123.24 (deferred) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --sE9RVuJe7Fd5Q2Z0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Dec 21, 2020 at 03:14:14PM +0000, PG Bug reporting form wrote: > Following Fatal message is shown: > pg_rewind: fatal: restore_command is not set in the target cluster >=20 > pg_rewind looks at the postgresql.conf in /var/postgres/13/data in stead = of > the location where the configuration files reside (/etc/postgres/13/data). > It would be nice to add an option to tell pg_rewind that configuration fi= les > are on a different location. pg_rewind uses the command "postgres -C restore_command -D DATA_FOLDER" to grab the configuration in this case (see getRestoreCommand() in pg_rewind.c), but here you have a service startup configuration where the logic makes use of -c config_file=3D/etc/postgres/13/data/postgresql.conf, right? Indeed, we would need an extra option to be able to support this case and pass down the configuration file path down to the postgres command used in pg_rewind. We could name this option for example --target-conf, that can only be used when --restore-target-wal is specified. Would you like to write a patch? -- Michael --sE9RVuJe7Fd5Q2Z0 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAl/hdyUACgkQnvQgOdby QH1Kqw/7B3mJXh+6lO2BRLOC0Ofa0VT3pkRKSAVioGGTPIWWxp/TLZVqVKh38nXU gqiRTsvo2vNu0tBXIUN8kZLWUt3yfRbD5pszgRGFf4mxDG3MuH7flzP1tLtujXvP kYn67h+cvZq+FGUYycJHC8mmEw3hJp0pjGUe+hrZMKjrnh13QBcizS/7CFCe/TZY voXQ1ZSyIQk6ppQtq31dFYFWScfX21S6Uq7inwZz+lhhVpdr6YkBNYz9qUM+nG8W yw5G+hzJ80uo8pbwtYDHgMuWLsxfqPhA+zbha1JFkD1PCJHCU0fILG6KfZJk1LG7 OQbtHMISWrMhSZ66zU75c8Q9a3k5lcP7GkqV1bvqYPUXFUlSSeRck4+eK+YgT8C8 Ycqu/klwy6WyjbeT8mGleMpyqNO5kzK4VIKKZt3ftPLxoGaFgchF3FHxXOyiFBNl g+8+08XZPiFINeJuzSAF8UnvsdeiWVA+R6xtaLv6oBdLrwnFEwDVw+Sb1XOs6a21 zxjV/0Ywx0INSCDQh+wcovPIBZsthclboSm/cX2OxHk1c5WyL9sUDfsWEaiWaJMc n2jzo1u6pawdZGXXnkb6wr6+pUSXdAt1zgZ+MpxSX5HaZRovKq/fsMmc+7I9vdjY njsYaVr3OS56QhRjMfXC9cAA6sgzC1UNydNGR/mdiB3E5EXG63U= =8z48 -----END PGP SIGNATURE----- --sE9RVuJe7Fd5Q2Z0--