Re: PostgreSQL and a Catch-22 Issue related to dead rows - Mailing list pgsql-performance

From Christophe Pettus
Subject Re: PostgreSQL and a Catch-22 Issue related to dead rows
Date
Msg-id 5EE4CC0C-E624-4E82-A2E8-B2EBA44D3521@thebuild.com
Whole thread Raw
In response to PostgreSQL and a Catch-22 Issue related to dead rows  (Lars Aksel Opsahl <Lars.Opsahl@nibio.no>)
Responses Re: PostgreSQL and a Catch-22 Issue related to dead rows
List pgsql-performance

> On Dec 9, 2024, at 03:02, Lars Aksel Opsahl <Lars.Opsahl@nibio.no> wrote:
> If there were a way to remove dead rows without requiring a commit from totally unrelated jobs, it would be much
easier.

Without seeing into the future, PostgreSQL doesn't know if a particular open transaction is "totally unrelated" to any
otheropen transaction.  Any open transaction can potentially see rows that have been deleted or updated since it began,
andwithout knowing what operations are coming, it doesn't know if it is safe to remove them. 

(Strictly speaking, the rows you are describing are not "dead," in that they are still visible to some transaction.)





pgsql-performance by date:

Previous
From: Rick Otten
Date:
Subject: Re: PostgreSQL and a Catch-22 Issue related to dead rows
Next
From: Tom Lane
Date:
Subject: Re: PostgreSQL and a Catch-22 Issue related to dead rows