Re: "PANIC: could not open critical system index 2662" - twice - Mailing list pgsql-general

From Andres Freund
Subject Re: "PANIC: could not open critical system index 2662" - twice
Date
Msg-id 20230508194748.6ydbfiozcfsynaq6@awork3.anarazel.de
Whole thread Raw
In response to Re: "PANIC: could not open critical system index 2662" - twice  (Evgeny Morozov <postgresql3@realityexists.net>)
Responses Re: "PANIC: could not open critical system index 2662" - twice  (Evgeny Morozov <postgresql3@realityexists.net>)
List pgsql-general
Hi,

On 2023-05-07 16:10:28 +0000, Evgeny Morozov wrote:
> Yes, kind of. We have a test suite that creates one test DB and runs a
> bunch of tests on it. Two of these tests, however, create another DB
> each (also by cloning the same template DB) in order to test copying
> data between DBs. It's only these "extra" DBs that were corrupted, at
> least on this occasion.

Did you have any occasions where CREATE or DROP DATABASE was interrupted?
Either due the connection being terminated or a crash?

As described in
https://postgr.es/m/20230314174521.74jl6ffqsee5mtug%40awork3.anarazel.de
we don't handle that correctly for DROP DATABASE.

I think that might actually fit the symptoms - the DropDatabaseBuffers() will
throw away the dirty buffer contents from the WAL strategy CREATE DATABASE,
but if you then get cancelled ata point before all the files are removed, the
on-disk fails with all-zeroes would remain.

Greetings,

Andres Freund



pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: "PANIC: could not open critical system index 2662" - twice
Next
From: Laurenz Albe
Date:
Subject: Re: ICU, locale and collation question