Re: How to debug a connection that's "active" but hanging?

From: Jurrie Overgoor <postgresql-mailinglist(at)jurr(dot)org>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: How to debug a connection that's "active" but hanging?
Date: 2021-07-15 08:30:24
Message-ID: 3f408663-0754-0fc5-a4d0-0e1dcfb6b832@jurr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 12-07-2021 23:21, Tom Lane wrote:
> Jurrie Overgoor <postgresql-mailinglist(at)jurr(dot)org> writes:
>> Is this considered a bug in PostgreSQL, or
>> am I misusing the database engine by doing DROP DATABASE and CREATE
>> DATABASE over and over again?
> It's not a bug. I suppose in a perfect world the stats would
> automatically be up to date all the time, but in the real world
> it seems like the cost of that would be exorbitant.

I see - that makes sense.

To fix this issue, I made sure a `VACUUM` is done prior to running the
unit tests. It's run as the database owner, so not all relations are
vacuumed. But it seems to vacuum the necessary relations, so no more
hanging queries.

Thanks Tom and Vijaykumar for your support!

With kind regards,

Jurrie

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Laurenz Albe 2021-07-15 09:08:04 Re: Problem upgrading from Postgresql 9.5
Previous Message Ho John Lee 2021-07-15 04:47:51 Re: How to display stored image as bytea or as large objects?