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 1jkV4l-0003rF-O5 for pgsql-general@arkaria.postgresql.org; Sun, 14 Jun 2020 16:01:39 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jkV4j-0001LP-HP for pgsql-general@arkaria.postgresql.org; Sun, 14 Jun 2020 16:01:37 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jkV4j-0001LI-8v for pgsql-general@lists.postgresql.org; Sun, 14 Jun 2020 16:01:37 +0000 Received: from wout4-smtp.messagingengine.com ([64.147.123.20]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jkV4e-00068z-RB for pgsql-general@postgresql.org; Sun, 14 Jun 2020 16:01:36 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 96F58510; Sun, 14 Jun 2020 12:01:28 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Sun, 14 Jun 2020 12:01:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm3; bh=k 9lTN5NuN/3XSiQIUfDzk3DwnZpnV/2FzW/ErfG5iWU=; b=ibGe2+/3wDgpHTDsi GEaktzmOLvqbyaBULJ1KEQAs8M4u8Pb+lmOtRQLPgGy2BxCtG58q2Dtpz6QrP96i fugzzvqTxJptw5AtYnRhhnCW3X4mMPoP44iANN7A1yyDz5KsIP965H7Um4JwfR9O 4IPZUXhijszydNNXlxUQvPEq2D7CnWuT9mf1PGaUoMJXsp5m0Shlj1oEwLufGRl0 sZlLNaQ4v55v3GQlXL5gko2TMbVVnl2Q4/1iJqrqRkHTk6cLphynQKEDN12XpzHd FtVR13ChOHMhH6m6NQKkh7pV05mgSskOFGqzPvl5x+MqIIpNBrQWZj5LAIduwaDT tHPhQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=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=k9lTN5NuN/3XSiQIUfDzk3DwnZpnV/2FzW/ErfG5i WU=; b=UH55dPIuiYFhsQVrVE5JpFKaRrRDE/kmdBeMkETrVoMo9Jg9vu1A3cKuX pb3ecYGxS6UCkP8VUhIzqmqlxrbRs4zLe2y2GyAOPT4HUWD2rcr0gLh8pxdlpLQM eP+124G2d8U9zB2LaUtedShCw5P9AgNiwi/5CHyHbph7hQiDgf0s+BQyCaUcRir/ XFAj8bdIiRDjHxCSc7XuTTLXTEs82bUR4HyOS8tRKW8qyNuikydrck40zbXI59Bg m1AeFlrT9+7varQy4nbLrZinJotGHAHRUQH9VDRAlxeQfaYB2MogIP/Rca3vww8K S1XvcC0DmhCAcU8UPZ3gB8dyoVA9w== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrudeiiedgleekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepuffvfhfhkffffgggjggtgfesthekredttdefheenucfhrhhomheptegurhhi rghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtoh hmqeenucggtffrrghtthgvrhhnpeefleeuffdugfeiheffgefhtdevudehudduteeuuefg keegtefggeeluddukefghfenucffohhmrghinhepphhoshhtghhrvghsqhhlrdhorhhgpd hfohhrrdhnvghtpdhpghgsohhunhgtvghrrdhorhhgnecukfhppeejhedrudejvddrhedr vdefudenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe grughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtohhm X-ME-Proxy: Received: from [192.168.1.3] (75-172-5-231.tukw.qwest.net [75.172.5.231]) by mail.messagingengine.com (Postfix) with ESMTPA id 645BB3280059; Sun, 14 Jun 2020 12:01:27 -0400 (EDT) Subject: Re: pg_service.conf and client support To: Niels Jespersen , "pgsql-general@postgresql.org" References: From: Adrian Klaver Message-ID: Date: Sun, 14 Jun 2020 09:01:26 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 6/13/20 10:03 PM, Niels Jespersen wrote: > Hello all > > I just found out about the pg service file. > https://www.postgresql.org/docs/current/libpq-pgservice.html > > I don’t know why it took me so long finding this. I have been looking > for ways to abstract physical details of data location away for clients > (much like Oracle’s tnsnames). > > Want to move a cluster to a new host. Sure, move it, edit > pg_service.conf and clients will not know the difference. > > It works great for at least psql and psycopg2. > > But I cannot find anything on pg_service.conf and the Postgres ODBC > driver and Npgsql for .Net > > I know pg_service.conf support is implemented through libpq and support > for rivers not using libpq is not a given thing. > > But I think the need for the abstraction of connection details is a > general one. > > Can anyone shed som light on the ubiquitousness of support for > pg_service.conf? > > Are there any other mechanisms with broader support, that can be used > instead of pg_service.conf (if support is scarce beyond what builds on > libpq)? Only thing I know of is something like pgbouncer(http://www.pgbouncer.org/) where you keep a constant connection setting for the pooler and then change the settings for the database(s) it connects to. > > Thank you. > > Regards Niels Jespersen > -- Adrian Klaver adrian.klaver@aklaver.com