closing connection more expensive than opening connection?

From: Rob Sargent <rsargent(at)xmission(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: closing connection more expensive than opening connection?
Date: 2011-03-03 15:27:36
Message-ID: 4D6FB368.6000005@xmission.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

A developer here accidentally flooded a server with connection opens and
closes, essentially one per transaction during a multi-threaded data
migration process.

We were curious if this suggests that connection clean up is more
expensive than creation thereby exhausting resources, or if perhaps the
server wasn't returning to the essentially backgrounded clean-up task
adroitly (enough)?

Don't worry we are now using a connection pool for the migration, but
the situation was, um, er, entertaining. The server side said
eof-from-client, the client side said many variations of cannot-connect,
then they would work out their differences briefly and do the same dance
over again after sufficient connections.

Cheers,
rjs

Browse pgsql-general by date

  From Date Subject
Next Message Rob Sargent 2011-03-03 15:28:42 opening connection more expensive than closing connection?
Previous Message Willy-Bas Loos 2011-03-03 14:40:41 Re: data type