We will now show you one simple, yet important, application of the previous recipe, Setting up a connection pool. In that recipe, you saw how to reuse connections with PgBouncer, and thus reduce the cost of disconnecting and reconnecting.
Here, we will demonstrate another way to use PgBouncer—one instance can connect to databases hosted by different database servers at the same time. The databases can be on separate hosts, and can even have different major versions of PostgreSQL!
Suppose we have three database servers, each one hosting one database. All you need to know beforehand is the connection string for each database server.
More complex arrangements are possible, but those ...