It's a command line option for the server.
http://developer.postgresql.org/docs/postgres/app-postmaster.html
> -----Original Message-----
> From: ohp@pyrenet.fr [mailto:ohp@pyrenet.fr]
> Sent: Monday, November 17, 2003 11:21 AM
> To: pgsql-hackers list
> Subject: [HACKERS] Connexions question
>
>
> Hi all,
>
> I don't think it's a FAQ, Is it possible to limit then number
> of simultaneous connexions one can make to a particular databse.
>
> E.G: I have 128 connexions max of witch I wan't to restrict
> at most 60 to database x, leaving in the worst case 68 for
> all others...
>
> Am I clear?
>
> --
> Olivier PRENANT Tel: +33-5-61-50-97-00 (Work)
> 6, Chemin d'Harraud Turrou +33-5-61-50-97-01 (Fax)
> 31190 AUTERIVE +33-6-07-63-80-64 (GSM)
> FRANCE Email: ohp@pyrenet.fr
> --------------------------------------------------------------
> ----------------
> Make your life a dream, make your dream a reality. (St Exupery)
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>