Re: Could not resolve host name error in psycopg2 - Mailing list pgsql-general

From Adrian Klaver
Subject Re: Could not resolve host name error in psycopg2
Date
Msg-id 4e520e58-3a5c-eab2-3563-8f5f38ff7e26@aklaver.com
Whole thread Raw
In response to Re: Could not resolve host name error in psycopg2  (Paul Förster <paul.foerster@gmail.com>)
Responses Re: Could not resolve host name error in psycopg2
List pgsql-general
On 4/17/20 12:02 AM, Paul Förster wrote:
> Hi Adrian,
> 
>> On 17. Apr, 2020, at 03:00, Adrian Klaver <adrian.klaver@aklaver.com> wrote:
>>
>> Huh? Leaving open connections is not considered a good thing. In other words a connection should last for as long as
ittakes to get it's task done and then it should close.
 
> 
> I basically agree on this, but there are two big "but"s:
> 
> - recurring monitoring connections flood the logs unless they connect and never disconnect again.
> 
> - applications with hundreds or thousands of users may flood the logs, even though a pool may be used. If said pool
doesn'tkeep its connections open most of the time you will notice that the database cluster is very busy logging
connections.

But most pools can grow and shrink in response to demand, so at some 
point there are connect/disconnect cycles.

> 
> Do you really want that?

No. The issue at hand though was the idea that an application(Django in 
this case) would open a connection once and never reconnect. That is 
unrealistic.

> 
> Cheers,
> Paul
> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com



pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Replication issue
Next
From: Achilleas Mantzios
Date:
Subject: Re: easy way to acquire height / width from images (PNG, JPEG) storedas bytea?