Re: "not related" code blocks for removal of dead rows when using vacuum and this kills the performance - Mailing list pgsql-performance

From Laurenz Albe
Subject Re: "not related" code blocks for removal of dead rows when using vacuum and this kills the performance
Date
Msg-id 82d75b5687ab9e3dc2a5040f10a227bd1cebf066.camel@cybertec.at
Whole thread Raw
In response to Re: "not related" code blocks for removal of dead rows when using vacuum and this kills the performance  (Lars Aksel Opsahl <Lars.Opsahl@nibio.no>)
Responses Re: "not related" code blocks for removal of dead rows when using vacuum and this kills the performance  (Lars Aksel Opsahl <Lars.Opsahl@nibio.no>)
List pgsql-performance
On Tue, 2024-02-20 at 05:46 +0000, Lars Aksel Opsahl wrote:
> If this is expected behavior it means that any user on the database that writes
> a long running sql that does not even insert any data can kill performance for
> any other user in the database.

Yes, that is the case.  A long running query will hold a snapshot, and no data
visible in that snapshot can be deleted.

That can cause bloat, which can impact performance.

> So applications like QGIS who seems to keep open connections for a while can
> then also kill the performance for any other user in the data.

No, that is not a problem.  Keeping *connections* open is a good thing. It is
keeping data modifying transactions, cursors or long-running queries open
that constitutes a problem.

Yours,
Laurenz Albe



pgsql-performance by date:

Previous
From: Lars Aksel Opsahl
Date:
Subject: Re: "not related" code blocks for removal of dead rows when using vacuum and this kills the performance
Next
From: Lars Aksel Opsahl
Date:
Subject: Re: "not related" code blocks for removal of dead rows when using vacuum and this kills the performance