pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Paul Förster <paul.foerster@gmail.com>
Cc: derwin theduck <hotchipsveg@gmail.com>
Cc: pgsql-general@postgresql.org
Subject: Re: Could not resolve host name error in psycopg2
Date: Fri, 17 Apr 2020 07:10:51 -0700
Message-ID: <4e520e58-3a5c-eab2-3563-8f5f38ff7e26@aklaver.com> (raw)
In-Reply-To: <EC756DEE-8C58-4F88-BA05-A9D7D3C3D15D@gmail.com>
References: <CA+sT1FBWM8NOwRK=0GG93MWs=kqyF8UBiRgZSwccQOVdEMbiBA@mail.gmail.com>
	<f0e2ba77-1469-1526-e113-1b201847e683@aklaver.com>
	<EC756DEE-8C58-4F88-BA05-A9D7D3C3D15D@gmail.com>

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 it takes 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't keep 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





view thread (6+ messages)  latest in thread

Message-ID: <4e520e58-3a5c-eab2-3563-8f5f38ff7e26@aklaver.com>
Permalink:  ../4e520e58-3a5c-eab2-3563-8f5f38ff7e26@aklaver.com/
Also on:    postgresql.org/message-id/4e520e58-3a5c-eab2-3563-8f5f38ff7e26@aklaver.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: adrian.klaver@aklaver.com, paul.foerster@gmail.com, hotchipsveg@gmail.com
  Subject: Re: Could not resolve host name error in psycopg2
  In-Reply-To: <4e520e58-3a5c-eab2-3563-8f5f38ff7e26@aklaver.com>
  References: <CA+sT1FBWM8NOwRK=0GG93MWs=kqyF8UBiRgZSwccQOVdEMbiBA@mail.gmail.com> <f0e2ba77-1469-1526-e113-1b201847e683@aklaver.com> <EC756DEE-8C58-4F88-BA05-A9D7D3C3D15D@gmail.com> <4e520e58-3a5c-eab2-3563-8f5f38ff7e26@aklaver.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox