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 1qABa2-0003cM-IX for pgsql-general@arkaria.postgresql.org; Fri, 16 Jun 2023 15:41:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1qABa1-0004Vl-Ba for pgsql-general@arkaria.postgresql.org; Fri, 16 Jun 2023 15:41:41 +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 1qABa0-0004Vc-WE for pgsql-general@lists.postgresql.org; Fri, 16 Jun 2023 15:41:41 +0000 Received: from mail-yw1-x112a.google.com ([2607:f8b0:4864:20::112a]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qABZx-002YI7-6r for pgsql-general@lists.postgresql.org; Fri, 16 Jun 2023 15:41:38 +0000 Received: by mail-yw1-x112a.google.com with SMTP id 00721157ae682-56d378b75f0so10100877b3.1 for ; Fri, 16 Jun 2023 08:41:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686930095; x=1689522095; 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=/tGtIj9Mnuhf1Pf49IV5SftFBuOmJ5bu39LoxvjTTDI=; b=F5ECAmrfeJsXje3v9ixDbOSZ0KqyRhrfTkz2tSCh+/TinQ3nxVrcEJY686EUsU4L9x YpT0WclDWGDtR/UoO9zDNehAs0yuiuI+f7785I0pF3rsxlBcBsfITjM6FUvVOsuGlOBR VZaiN2Ji/mPPGhRmyaNf5K8AWwWoXD2JO5Z6kuaw/AVzD14vR3ITYYLYeYSjKaoFuRpp z8sXfu78z4b0u/KnpYUR164YOWhR6uwSOO++6GwmqYk8hGJJ45kYb8rMMe+L01ygfn8j VSbCiGR3FJNzW1gqSrvqh23HWRpM5J10Rh4irs8mHOY0f3uxXBUMpL2lhpBzKzm23qB5 RR4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686930095; x=1689522095; 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=/tGtIj9Mnuhf1Pf49IV5SftFBuOmJ5bu39LoxvjTTDI=; b=bgCP1iHqKWnox9vEkjmuEVvaRlbOIR5A5mpvC3i6pxzjgQx72xsBE3ViouA1JOsqpA X1rxqR6Yp8/Buqa0hqOYgcnL4yS28wHiCti9OcSOWiCvrkPBmHLNz35JDT8LOmzJJTm5 Zyy33Rk9UyCf3iTImEYpHhL/wbI08uVyEViNiCdEmyhLOD4XI1DooS20+UlTvPPK2OtD Twocd6zS40elB8yUfaT1rUZ0xheMDrLeZMAabZcAumtvrQAqVn3dovMPLXhj337ueeg5 73MoFt1hRPVYb6CFJ8DmSGElBSDsKsum0y51P2/931AUM+oW/173FX75GoPjpAxWminN MEIw== X-Gm-Message-State: AC+VfDw7rDj6yhpwFWKSybfoJLziq2QE7SMehdXSR0CVcX29wjSSkjIb ro05Nt083UlkY/290dyv7gPE1Hsoe/Q= X-Google-Smtp-Source: ACHHUZ7zehrvrO+iOMmjjc80cdLTVAqzQwF56ETfybGKJtQWBDax5wSk+n2mSZcZA8h20zXmmSvczQ== X-Received: by 2002:a25:4004:0:b0:be5:5ed2:82e6 with SMTP id n4-20020a254004000000b00be55ed282e6mr1140168yba.65.1686930095054; Fri, 16 Jun 2023 08:41:35 -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 k126-20020a252484000000b00bca782fcd6esm2730841ybk.55.2023.06.16.08.41.34 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 16 Jun 2023 08:41:34 -0700 (PDT) Message-ID: Date: Fri, 16 Jun 2023 10:41:34 -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: <4d70ad6a5a73b9e9faaf8f2715cac862c86def3c.camel@cybertec.at> <6ba275cd2d442a913a234564aeaec27311ec1d16.camel@cybertec.at> <71943c04e05c3c13d5cd2b287909f351@weiller.eu> <6e8947e1d4394082e27f1f8354ae5d4f@weiller.eu> <507b783267640f0b8dd6b6fdc0f132fa27cb4212.camel@cybertec.at> From: Ron In-Reply-To: <507b783267640f0b8dd6b6fdc0f132fa27cb4212.camel@cybertec.at> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 6/16/23 10:18, Laurenz Albe wrote: > On Fri, 2023-06-16 at 14:49 +0000, Brainmue wrote: >> 16. Juni 2023 14:50, "Laurenz Albe" schrieb: >> >>> 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 >>> >>> If you want to manage the connection strings centrally, you can use LDAP lookup: >>> https://www.postgresql.org/docs/current/libpq-ldap.html >> Thank you, I already know this solution, but the LDAP solution is out of the question for us and >> the file again means an intervention on the client. And that's exactly what we don't want. > Okay. > > Then why don't you go with your original solution, but use a unique TCP port number > for each database? There are enough port numbers available. That way, there is no > collision and no need for a proxy to map port numbers. In practice, that gets very complicated is large organizations: every time you add another database, you must file another request with the CISO RISK office to get yet another non-standard port open from dozens of machines, and the network team implement them. Operationally much simpler to have a listener handle that. -- Born in Arizona, moved to Babylonia.