Postgresql – using port range for connecting to Postgres

postgresql

I am new to postgres and I would like to use it with postGIS. It all works perfectly. The default port I use is 5432. I would like to know if it is possible to use multiple ports i.e 5430-5431-5432-5433 …etc or a range i.e 5430-5 to connect to the database.
The reason behind this is that I am trying to have several updates from different sources and I would not like o have a bottle neck using the same port.

Best Answer

No, that's not possible. A single Postgres server can only listen on a single port.

But: the communication through the port is not a bottleneck.

For every connection made, Postgres creates a dedicated backend process once that is established the backend process does all the work.

If you want to increase network throughput you could install a second network interface and make Postgres listen on both interfaces.

If concurrent use of a single server port was a problem, websites wouldn't be able to handle the load they can. After all a webserver only listens on a single port as well (80 or 443)