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 1qAA3t-0007hx-32 for pgsql-general@arkaria.postgresql.org; Fri, 16 Jun 2023 14:04:25 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1qAA3r-0003EQ-Vw for pgsql-general@arkaria.postgresql.org; Fri, 16 Jun 2023 14:04:23 +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 1qAA3r-0003EH-KS for pgsql-general@lists.postgresql.org; Fri, 16 Jun 2023 14:04:23 +0000 Received: from mail-yb1-xb2e.google.com ([2607:f8b0:4864:20::b2e]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qAA3p-002XcF-4X for pgsql-general@lists.postgresql.org; Fri, 16 Jun 2023 14:04:22 +0000 Received: by mail-yb1-xb2e.google.com with SMTP id 3f1490d57ef6-bb3a77abd7bso661626276.0 for ; Fri, 16 Jun 2023 07:04:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686924260; x=1689516260; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=ckUNQS3JhAFE/7ajvgSGOMymXxroVCgxLnoXm9mTcWA=; b=I0F74dzsOVDT8WENDY2YTJki41xjntpzaHCk3FUpm9JUY/dg8a8q7UUKQvecaDUl41 denljdbO877anxLbBN1SRphCx4Fpi2YyayjPGYpUqjrOC8s/DViENJCp8KY4JYV1Mitn MJ1b955Il/0EFeX3goOBqxL0FOHkiJGdTz/Yo8gBeNdOnu7j3mxB5q1PPLXN0f2HZmq8 I0QY8GMfnfH1uh60zUXliFL6bsG6uy6F60iD5PpOCFZOp0g7BjttY05nVVo4SU6cnleR /d2KWTu7a6ZgiiVK49ipmaeP9Rk2J5NPh+eJV/Zcmpq2h6izunDznauiGa33rUE8qwwA n9hA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686924260; x=1689516260; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ckUNQS3JhAFE/7ajvgSGOMymXxroVCgxLnoXm9mTcWA=; b=Ta5Vi+ZDaG2vGNvTcNYdztNKNiL/cUiRm7OgX2eXO5I3BRQj7cTyK28evt+Z5TBRWu MJiv7+8BPUU35eqfx4ciA9OYIvih+XEh4slRirguEmhuQsGMkCKsO+x4uG++lI0ICu5/ Oobf6XtIIyenX9SqjkhhawiKUSs7r2SphycCJS6mtTxjd39VcPV4AkTCCTXSR4GtnX8h agw8e8+Mkctt5KMxripC+vhlJ0U0TtcUAIAeZvHnLWkWQ6KwF1B+LTJqJj4xrkEsxnfi nVHXG4YLI+hhlzHJGFQI4VstQ71CgJjwlmIbIPnmpMpG/7VIXMAR0D6pa+iy4ZTxZE5Y nxKA== X-Gm-Message-State: AC+VfDzo6Yg5Uejjtm5gHpeoCGB1yoC9Jry/QQHzDANcGpJ9s/mWDOvP aZn49HT4zE5U7a/Rz9BGZPp3SjtFI0M= X-Google-Smtp-Source: ACHHUZ40UCJsG1/HX5LGEpgYRovxSuKfBserQYXY2fbq72ZzYKEd3goCgm9BlzUCcUshRxrKo13Atg== X-Received: by 2002:a25:ef0f:0:b0:bc8:363e:83ca with SMTP id g15-20020a25ef0f000000b00bc8363e83camr1358803ybd.31.1686924260000; Fri, 16 Jun 2023 07:04:20 -0700 (PDT) Received: from ?IPV6:2600:1700:bd2c:b810:f889:4059:a055:b96e? ([2600:1700:bd2c:b810:f889:4059:a055:b96e]) by smtp.googlemail.com with ESMTPSA id v132-20020a25488a000000b00ba755f271c1sm4603589yba.9.2023.06.16.07.04.19 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 16 Jun 2023 07:04:19 -0700 (PDT) Message-ID: Date: Fri, 16 Jun 2023 09:04:19 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: Question: Multiple pg clusters on one server can be reached with the standard port. Content-Language: en-US To: pgsql-general@lists.postgresql.org References: <6ba275cd2d442a913a234564aeaec27311ec1d16.camel@cybertec.at> <71943c04e05c3c13d5cd2b287909f351@weiller.eu> <4d70ad6a5a73b9e9faaf8f2715cac862c86def3c.camel@cybertec.at> From: Ron In-Reply-To: <4d70ad6a5a73b9e9faaf8f2715cac862c86def3c.camel@cybertec.at> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 6/16/23 07:50, Laurenz Albe wrote: > On Fri, 2023-06-16 at 12:35 +0000, Brainmue wrote: >> We want to minimise dependencies between the application and the associated PostgreSQL DB. >> The idea is that the application gets its DB alias and this is then used as a connection string. >> This way we can decide in the backend on which server the PostgreSQL DB is running. > There is an existing solution for that: the libpq connection service file: > https://www.postgresql.org/docs/current/libpq-pgservice.html Do JDBC and ODBC recognize .pg_service.conf?  I know they don't recognize .pgpass. > If you want to manage the connection strings centrally, you can use LDAP lookup: > https://www.postgresql.org/docs/current/libpq-ldap.html > > Yours, > Laurenz Albe -- Born in Arizona, moved to Babylonia.