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 1ptvT5-0001v7-LK for pgsql-general@arkaria.postgresql.org; Tue, 02 May 2023 19:15:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ptvT2-0000gI-HS for pgsql-general@arkaria.postgresql.org; Tue, 02 May 2023 19:15:16 +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 1ptvT2-0000g9-77 for pgsql-general@lists.postgresql.org; Tue, 02 May 2023 19:15:16 +0000 Received: from brisi.sourcepole.ch ([5.9.57.43]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1ptvSz-000CfH-KN for pgsql-general@lists.postgresql.org; Tue, 02 May 2023 19:15:15 +0000 Received: from [213.55.227.219] (helo=[192.168.43.81]) by vilan-mail with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1ptvSy-00011b-1H for pgsql-general@lists.postgresql.org; Tue, 02 May 2023 21:15:12 +0200 Message-ID: Date: Tue, 2 May 2023 21:15:08 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: Regarding SSL Enablement in PostgreSQL Database on different port To: pgsql-general@lists.postgresql.org References: Content-Language: en-GB From: Tomas Pospisek In-Reply-To: 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 02.05.23 12:13, Magnus Hagander wrote: > On Tue, May 2, 2023 at 11:43 AM sujay kadam wrote: >> >> Hi PostgreSQL Team, >> >> >> I want to enable SSL in PostgreSQL Database on a new port. >> >> I don’t want the default port that is 5432 SSL enabled, but I want to configure another port to enable SSL on it. >> >> As per my requirement, I cannot use the same port for normal connection and SSL connection. >> >> Hence, we require a new port to be SSL enabled. >> >> >> Please guide us with proper information and links to achieve the above task. > > That is now how SSL in PostgreSQL works. It will always run on the > same port, and PostgreSQL will only listen on one port. > > You can probably do some hacky solution to it by running something > like pgbouncer on a different port and enable SSL only in that one. > But it will be a hack. I would recommend instead reviewing your > requirements and see if you can make them work with how PostgreSQL is > designed. Oh, I think your idea to use pgbouncer to take care of the SSL termination is elegant. I don't think me I'd characterize it as a hack if properly set up. Why do you consider it a hack? *t