Re: Detecting File Damage & Inconsistencies - Mailing list pgsql-hackers

From Jose Luis Tallon
Subject Re: Detecting File Damage & Inconsistencies
Date
Msg-id 4f4d091f-8c1c-c341-7164-219ee3108672@adv-solutions.net
Whole thread Raw
In response to Detecting File Damage & Inconsistencies  (Simon Riggs <simon@2ndquadrant.com>)
List pgsql-hackers
On 11/11/20 21:56, Simon Riggs wrote:
> [ŝnip]
>
> REINDEX VERIFY
> After the new index is created, but before we drop the old index:
> Check whether the two indexes match:
> * checks whether the previous index had pointers to row versions that
> don't exist
> * checks whether the heap has rows that were not in the old index
> This approach piggybacks on existing operations. AccessShareLock is
> held on both indexes before the old one is dropped.

FWIW, as long as it's optional (due to the added runtime), it'd be a 
welcome feature.

Maybe something along the lines of:

     REINDEX (verify yes) ....


> Other ideas are welcome.

I still have nightmares from an specific customer case w/ shared storage 
(using VxFS) among two postmaster instances ---supposedly could never be 
active concurrently, not completely sure that it didn't actually 
happen--- and the corruption that we found there. I seem to remember 
that they even had scripts to remove the locking when switching over and 
back :S

I don't think Postgres can do much about this, but maybe someone can 
come up with a suitable countermeasure.


Just my .02€

Thanks,

     / J.L.





pgsql-hackers by date:

Previous
From: Fujii Masao
Date:
Subject: Re: Use standard SIGHUP and SIGTERM handlers in autoprewarm module
Next
From: Pavel Stehule
Date:
Subject: Re: Is it useful to record whether plans are generic or custom?