I'm glad that pretty much the whole thing is 'use pgbouncer.'
This was my exact situation at a previous position. We needed up to 20k connections to a single pgsql master. Even the most monster postgres server falls over around ~600 connections (up to 1k depending on usage).
Using a pgbouncer-per-webserver we easily got to 20k.
I will say this was with 9.3 though, things may have changed on that front. Nowadays I use pgsql primarily for analytics, so there's only ever 20-30 connections tops, albeit doing quite heavy querying.