Re: inconsistency between the VM page visibility status and the visibility status of the page - Mailing list pgsql-hackers

From Tomas Vondra
Subject Re: inconsistency between the VM page visibility status and the visibility status of the page
Date
Msg-id 1eac7a08-b41f-1ab7-91b6-24df2dfd9c91@enterprisedb.com
Whole thread Raw
In response to inconsistency between the VM page visibility status and the visibility status of the page  ("yanhui.xiong"<yanhui.xiong@enmotech.com>)
List pgsql-hackers
On 7/20/23 08:44, yanhui.xiong wrote:
> Hi,
> 
> i had a issue here, When executing a SELECT statement using an
> index-only scan, i got a wrong row number because there may be an
> inconsistency between the VM page visibility status and the visibility
> status of the page,the VM bit is set and page-level is clear
> 
> 
> i read the code and note that there has a chance to happen like this,but
> how it happens?
> 
> the code do clear the page-level visibility and vm bit at the same time,
> i don not understand how it happens
> 

Well, by only looking at the code you're assuming two things:

1) the code is correct

2) the environment is perfect

Either (or both) of these assumptions may be wrong. There certainly
could be some subtle bug in the visibility map code, who knows. Or maybe
this is due to some sort of data corruption outside postgres.

It's impossible to answer without you digging much deeper and providing
much more information. What's the environment? What hardware? What PG
version? How long is it running? Any crashes? Any other cases of similar
issues? What does the page look like in pageinspect?

regards

-- 
Tomas Vondra
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Bharath Rupireddy
Date:
Subject: Re: Support worker_spi to execute the function dynamically.
Next
From: Alexander Pyhalov
Date:
Subject: Re: Partial aggregates pushdown