Re: "PANIC: could not open critical system index 2662" - twice

Поиск
Список
Период
Сортировка
От Thomas Munro
Тема Re: "PANIC: could not open critical system index 2662" - twice
Дата
Msg-id CA+hUKGJs6RR6pNGG3-Gd-jKV9Mx=1v7=GXaY6MBas7TEKOO8Dw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: "PANIC: could not open critical system index 2662" - twice  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
On Tue, May 9, 2023 at 10:04 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Michael Paquier <michael@paquier.xyz> writes:
> > One thing I was wondering about to improve the odds of the hits is to
> > be more aggressive with the number of relations created at once, so as
> > we are much more aggressive with the number of pages extended in
> > pg_class from the origin database.
>
> Andres seems to think it's a problem with aborting a DROP DATABASE.
> Adding more data might serve to make the window wider, perhaps.

Here's an easy way:

@@ -1689,6 +1689,14 @@ dropdb(const char *dbname, bool missing_ok, bool force)
        /* Close all smgr fds in all backends. */
        WaitForProcSignalBarrier(EmitProcSignalBarrier(PROCSIGNAL_BARRIER_SMGRRELEASE));

+/* XXX pretend one of the above steps got interrupted by a statement
timeout or ^C */
+if (random() % 2 == 0)
+{
+QueryCancelPending = true;
+InterruptPending = true;
+CHECK_FOR_INTERRUPTS();
+}

postgres=# create database db2;
CREATE DATABASE
postgres=# drop database db2;
ERROR:  canceling statement due to user request

$ psql db2
psql: error: connection to server on socket "/tmp/.s.PGSQL.5432"
failed: PANIC:  could not open critical system index 2662

$ od -t x1 base/111117/2662
0000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*
0100000
$ od -t x1 base/111117/2837
0000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*
0040000
$ od -t x1 base/111117/2840
0000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*
0100000



В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: "PANIC: could not open critical system index 2662" - twice
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: "PANIC: could not open critical system index 2662" - twice