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 1oLtb8-0002Mg-4a for pgsql-admin@arkaria.postgresql.org; Wed, 10 Aug 2022 21:50: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 1oLtb6-0007lY-PH for pgsql-admin@arkaria.postgresql.org; Wed, 10 Aug 2022 21:50:40 +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 1oLtb6-0007lP-EZ for pgsql-admin@lists.postgresql.org; Wed, 10 Aug 2022 21:50:40 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oLtb1-0005U7-Uo for pgsql-admin@postgresql.org; Wed, 10 Aug 2022 21:50:39 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 27ALoWTH384611; Wed, 10 Aug 2022 17:50:32 -0400 From: Tom Lane To: Scott Ribe cc: richard coleman , pgsql-admin@postgresql.org Subject: Re: postgresql definitive list of network resources used/needed? In-reply-to: <200DE464-2992-4D0C-96F1-6656E1CE932A@elevated-dev.com> References: <200DE464-2992-4D0C-96F1-6656E1CE932A@elevated-dev.com> Comments: In-reply-to Scott Ribe message dated "Wed, 10 Aug 2022 15:24:38 -0600" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <384609.1660168232.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Wed, 10 Aug 2022 17:50:32 -0400 Message-ID: <384610.1660168232@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Scott Ribe writes: >> On Aug 10, 2022, at 3:08 PM, richard coleman wrote: >> Apparently, I've discovered that PostgreSQL connects to itself over UDP= . = > No it doesn't. (It can use Unix domain sockets for local connections.) Possibly Richard is seeing the stats collector pipe, which is TCP local loopback on a random port number. (That'll be gone in v15, but it exists in all current releases.) > I've also discovered, while looking at the network while one of our serv= er was running PostgreSQL, that while there were a number of connections b= etween local 5432 and a random remote port, there was also a connection fr= om a local random port to a remote 5432. If these ports were closed and o= nly 5432 left open, this connection would have failed. postgres_fdw outgoing connection to a remote server? Maybe it's something else, but that's the most obvious theory. The incoming-connection port and the stats loopback are the only IP connections in a bare-bones Postgres system, but I think few people run it completely bare-bones. There's no such thing as a "definitive list" of ports used as long as you've told us nothing about (for example) your backup or replication setup, not to mention postgres_fdw and other extensions you might use. regards, tom lane