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

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: Lars Aksel Opsahl <Lars(dot)Opsahl(at)nibio(dot)no>, "pgsql-performance(at)lists(dot)postgresql(dot)org" <pgsql-performance(at)lists(dot)postgresql(dot)org>
Subject: Re: "not related" code blocks for removal of dead rows when using vacuum and this kills the performance
Date: 2024-02-20 07:29:14
Message-ID: 82d75b5687ab9e3dc2a5040f10a227bd1cebf066.camel@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Lars Aksel Opsahl 2024-02-20 10:46:15 Re: "not related" code blocks for removal of dead rows when using vacuum and this kills the performance
Previous Message Lars Aksel Opsahl 2024-02-20 05:46:39 Re: "not related" code blocks for removal of dead rows when using vacuum and this kills the performance