Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c2fJD-0005Fk-2t for pgsql-hackers@arkaria.postgresql.org; Fri, 04 Nov 2016 14:17:31 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1c2fJC-0001iW-Iq for pgsql-hackers@arkaria.postgresql.org; Fri, 04 Nov 2016 14:17:30 +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_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1c2fJC-0001iP-1Y for pgsql-hackers@postgresql.org; Fri, 04 Nov 2016 14:17:30 +0000 Received: from raven.toroid.org ([2a01:4f8:121:3401::2]) by magus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c2fJ8-00005h-Qi for pgsql-hackers@postgresql.org; Fri, 04 Nov 2016 14:17:29 +0000 Received: from kea.toroid.org (unknown [10.9.8.10]) by raven.toroid.org (Postfix) with ESMTP id 60D6A240C68A; Fri, 4 Nov 2016 15:17:25 +0100 (CET) Received: by kea.toroid.org (Postfix, from userid 1000) id 31F2A4E1692; Fri, 4 Nov 2016 19:47:24 +0530 (IST) Date: Fri, 4 Nov 2016 19:47:24 +0530 From: Abhijit Menon-Sen To: Simon Riggs Cc: Michael Paquier , Robert Haas , pgsql-hackers@postgresql.org Subject: Re: Proposal for changes to recovery.conf API Message-ID: <20161104141724.GA20702@toroid.org> References: <77122541-8ef8-89a5-b8f7-361af007cd02@pgmasters.net> <20161031234458.GA17299@toroid.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org At 2016-11-04 10:35:05 +0000, simon@2ndquadrant.com wrote: > > Since the "lots of parameters" approach is almost exactly what we have > now, I think we should do that first, get this patch committed and > then sit back and discuss an improved API and see what downsides it > introduces. Thanks, I agree strongly with this. Someone (Michael?) earlier mentioned the potential for introducing bugs with this patch (the idea of merging recovery.conf into postgresql.conf at all, not this particular incarnation). I think the current proposed approach with recovery_target=xid recovery_target_xid=xxx is preferable because (a) it doesn't introduce much new code, e.g., new parsing functions, nor (b) need many changes in the documentation—all we need is to say that of the various recovery_target_xxx parameters, the one that has priority is the one named by recovery_target. If I were to introduce recovery_target='xid xxx', I would at a minimum need to factor out (or duplicate) parsing and error handling code, make a type/value union-in-struct to store in the GUC *extra, then make sure that we handle the older values in a backwards-compatible way, and move a bunch of documentation around. Can it be done? Yes, of course; and I'll do it if that's the consensus. But it would be a backwards-compatible change to the current approach anyway, and I think it would be better to put in the simple way now before discussing the new API further. Let's get the basic new *functionality* out so that people can play with it, I'm sure we'll find a few non-API things that need tweaking as a result of the change. -- Abhijit -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers