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 1ikb9g-0005hp-OD for pgsql-hackers@arkaria.postgresql.org; Thu, 26 Dec 2019 21:58:53 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ikb9f-00086k-90 for pgsql-hackers@arkaria.postgresql.org; Thu, 26 Dec 2019 21:58:51 +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 1ikb9e-00086c-PM for pgsql-hackers@lists.postgresql.org; Thu, 26 Dec 2019 21:58:51 +0000 Received: from mail-pf1-x443.google.com ([2607:f8b0:4864:20::443]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1ikb9X-0003uS-Rj for pgsql-hackers@postgresql.org; Thu, 26 Dec 2019 21:58:49 +0000 Received: by mail-pf1-x443.google.com with SMTP id 195so12918403pfw.11 for ; Thu, 26 Dec 2019 13:58:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=ME6fc/g9b3jlmYOtB+rFsKdRnrJ58rbT6XVKc4+2huk=; b=QS6mjMU8KfQlcbKMGvM802SkXWo0kJrXqARkuLTSyXTBmkZ6IlOub+UgcO5g5Vqobd aLob9DhS5uYCIRdVB8PLVah7+P+S1QhqLLsNu8yu7/0O0z8oM5kQVRIhPpiQ0L2jOl2+ Wl9P2yckjoZJL28GlZG0SUaIqVCXGVSUBJFf2GaBC8F5DgkAVs2+NVuPuduQmk/t5rod tLOfvdnMzv5akSjNZAEVafyw6wr+JBXsuQ0j8iqStslCTniEK5XRtC7311Z4oM5Az397 jFTkbKoTAYJ67jbuprTvn92pxKPWOssR+G9JY0MrBZ5LiwwlfBknO38iV1nHjRZ1569J fHuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=ME6fc/g9b3jlmYOtB+rFsKdRnrJ58rbT6XVKc4+2huk=; b=seuHegXB8HlSSP1tR3wofPZIb6NOoy6PuBzsowZUeg4Q6g8NzbfuL8df82+b/K8ycP VAicv1pFcAtvQhVOwHjiMO9hL+76m+xKSoA0Y7JKebo873m87qsT2dmK5B/xL3zAqQQ9 v3tKrzmEJG33UhqQ8D2nEsROGc2mls297cZa2xY1SGlhmeJyOJphsMrwHEwdzvGMnSdF FrAuA3OmkzEGtrPsrzKc3nuQQmPUyRTgU4hSgdPt+Q8CBOhSGsWPeoxW6UQJUW1Mpd4O il9ZZ/dCdKzraJ71aujd6UcsQjf49Jm5sIsXL10w59E4+dYIY6HHc52U5BBpFZ3FWku+ YHkA== X-Gm-Message-State: APjAAAWezpxdlH2jD8t6+zuxJlmf+6dbL7Jpx6V65SLKSABCOYinZPuy FbSRs/OX4t6nswYvpa7IJwrIig== X-Google-Smtp-Source: APXvYqwjczTzs26F1GokLSKygGr4jsvuLVh19X7iY31a1zvCbCGAfepAFRCR5ytzbMXuh+CNfoWrBQ== X-Received: by 2002:a63:ed48:: with SMTP id m8mr49863450pgk.399.1577397522563; Thu, 26 Dec 2019 13:58:42 -0800 (PST) Received: from nimloth.alvh.no-ip.org ([190.121.29.3]) by smtp.gmail.com with ESMTPSA id o184sm34578121pgo.62.2019.12.26.13.58.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Dec 2019 13:58:41 -0800 (PST) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id E9EB33008FE; Thu, 26 Dec 2019 18:58:37 -0300 (-03) Date: Thu, 26 Dec 2019 18:58:37 -0300 From: Alvaro Herrera To: Dave Cramer Cc: Greg Nancarrow , "Tsunakawa, Takayuki" , Haribabu Kommi , Robert Haas , Laurenz Albe , Tom Lane , Jing Wang , PostgreSQL-development , Elvis Pranskevichus Subject: Re: Libpq support to connect to standby server as priority Message-ID: <20191226215837.GA18530@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2019-Dec-26, Dave Cramer wrote: > On Thu, 26 Dec 2019 at 15:07, Alvaro Herrera > wrote: > > There were other comments that I think went largely unaddressed, > > such as the point that the JDBC driver seems to offer a different > > syntax for the configuration, and should we offer a compatibility > > shim of some sort. (Frankly, I don't think we need to stress over > > this too much, but it seems that it wasn't even discussed.) > > We seem to ignore prior work here I agree. It would be wonderful if > there were only one syntax. Is it too late to change the syntax for > this patch as that ship has sailed for JDBC So, starting with pg10 we have target_session_attrs in libpq. These patches just add some more "attrs" that can be requested for a session. Tom's proposal[1] was to rename the conninfo option to match JDBC's targetServerType, adding a compatibility mechanism so that libpq's target_session_attrs continues to work for values "any" and "read-write"; but we already discussed all this with regards to the pgjdbc param names and we still decided not to use them[2] (ending as commit 721f7bd3cbcc). Maybe y'all want to relitigate this for some reason. I can help with getting an implementation finished once y'all are done with the politics. [1] https://postgr.es/m/26251.1547504236@sss.pgh.pa.us [2] https://www.postgresql.org/message-id/CAHg_5grVKbO73CqKNYsCYsX5aJ%3DdeDSAyW44wjmwt1uqngScdQ%40mail.gmail.com (If we do want to match pgJDBC's option name, then I suppose we need to add a synonym mechanism to libpq's option parsing. That doesn't look particularly difficult, and it would probably help clean up the mess that we currently track both the "char *" value of the option as well as a separate enum value for it, in the pgconn struct.) -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services