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 1gRLiX-0002tc-Rv for pgsql-hackers@arkaria.postgresql.org; Mon, 26 Nov 2018 18:34:45 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gRLiW-0005Lw-L9 for pgsql-hackers@arkaria.postgresql.org; Mon, 26 Nov 2018 18:34:44 +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 1gRLiW-0005Lp-Dt for pgsql-hackers@lists.postgresql.org; Mon, 26 Nov 2018 18:34:44 +0000 Received: from forward501o.mail.yandex.net ([37.140.190.203]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gRLiU-000707-1y for pgsql-hackers@postgresql.org; Mon, 26 Nov 2018 18:34:44 +0000 Received: from mxback3j.mail.yandex.net (mxback3j.mail.yandex.net [IPv6:2a02:6b8:0:1619::10c]) by forward501o.mail.yandex.net (Yandex) with ESMTP id 0F2F81E800B7; Mon, 26 Nov 2018 21:34:40 +0300 (MSK) Received: from localhost (localhost [::1]) by mxback3j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id 6rib0vxW5u-Yc9Sa1nb; Mon, 26 Nov 2018 21:34:39 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zsrv.org; s=mail; t=1543257279; bh=DiizOdOAIWC6DBTQAyH764T3rlDb+HVjR39otaySsKQ=; h=From:To:Cc:In-Reply-To:References:Subject:Date:Message-Id; b=Z5mKEmowjgPsecSM13MxiEGsHbHyXLwmftPewbRWPArePWJUYLNpkVn1r+UYSefIN 1lHHERgdFyxvWI8LuUz528t97+gywl6Egjt4bHxV6bwWqtBVAGGjdmtGDdeaGOvF2T jZP3MPSeSY2R2ziOja5hEf1yoTXreOtLsTiAfQ+Q= Authentication-Results: mxback3j.mail.yandex.net; dkim=pass header.i=@zsrv.org Received: by sas1-0a6c2e2b59d7.qloud-c.yandex.net with HTTP; Mon, 26 Nov 2018 21:34:38 +0300 From: Sergei Kornilov To: Stephen Frost Cc: Michael Paquier , Peter Eisentraut , Postgres hackers In-Reply-To: <20181126172118.GY3415@tamriel.snowman.net> References: <20181126002849.GD1776@paquier.xyz> <27802171543235530@iva2-6ec8f0a6115e.qloud-c.yandex.net> <20181126131640.GD14598@paquier.xyz> <20181126151852.GW3415@tamriel.snowman.net> <29465041543250389@iva4-f774db2b5297.qloud-c.yandex.net> <20181126172118.GY3415@tamriel.snowman.net> Subject: Re: pgsql: Integrate recovery.conf into postgresql.conf MIME-Version: 1.0 X-Mailer: Yamail [ http://yandex.ru ] 5.0 Date: Mon, 26 Nov 2018 21:34:38 +0300 Message-Id: <145311543257278@sas1-0a6c2e2b59d7.qloud-c.yandex.net> Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=utf-8 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hello > I think I would have done 'if (targetSettingsCount != 1)' here. Streaming replication does not have any recovery_target. Well, i can check StandbyModeRequested too and allow 0 recovery_target only for standby mode. >>  -# Multiple targets >>  -# Last entry has priority (note that an array respects the order of items >>  -# not hashes). > > You could (and imv should) include a test that throws an expected error > if multiple targets are specified. We have some example for checking unable-to-start DB? Did not find yet > Let’s at least fix the currently committed patch before adding new features or changing how things in recovery work. +1 regards, Sergei