Обсуждение: Pg analog to DBCC CCHECKDB?

Поиск
Список
Период
Сортировка

Pg analog to DBCC CCHECKDB?

От
Ron
Дата:
Hi,

In 9.6, does such a thing exist?  (We just restored a VM from snapshot and I 
want to verify the cluster sanity.)

Thanks

-- 
Angular momentum makes the world go 'round.



Re: Pg analog to DBCC CCHECKDB?

От
Michel Pelletier
Дата:
There is amcheck:


"When the heapallindexed argument to verification functions is true, an additional phase of verification is performed against the table associated with the target index relation. This consists of a “dummy” CREATE INDEX operation, which checks for the presence of all hypothetical new index tuples against a temporary, in-memory summarizing structure (this is built when needed during the basic first phase of verification). The summarizing structure “fingerprints” every tuple found within the target index. The high level principle behind heapallindexed verification is that a new index that is equivalent to the existing, target index must only have entries that can be found in the existing structure."

I haven't used this tool but it looks promising:



On Fri, Apr 5, 2019 at 7:34 AM Ron <ronljohnsonjr@gmail.com> wrote:
Hi,

In 9.6, does such a thing exist?  (We just restored a VM from snapshot and I
want to verify the cluster sanity.)

Thanks

--
Angular momentum makes the world go 'round.


Re: Pg analog to DBCC CCHECKDB?

От
Peter Geoghegan
Дата:
On Fri, Apr 5, 2019 at 7:33 AM Ron <ronljohnsonjr@gmail.com> wrote:
> In 9.6, does such a thing exist?  (We just restored a VM from snapshot and I
> want to verify the cluster sanity.)

amcheck is available for versions 9.4+, though it only appears in
contrib in Postgres 10. There are both yum and deb packages available.
See:

https://github.com/petergeoghegan/amcheck

-- 
Peter Geoghegan