Cause of "can't wait without a PROC structure"

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Cause of "can't wait without a PROC structure"
Дата
Msg-id 8126.1032969177@sss.pgh.pa.us
обсуждение исходный текст
Ответы Re: Cause of "can't wait without a PROC structure"  (Scott Shattuck <ss@technicalpursuit.com>)
Re: Cause of "can't wait without a PROC structure"  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
I've identified the reason for the occasional "can't wait without a PROC
structure" failures we've seen reported.  I had been thinking that this
must occur during backend startup, before MyProc is initialized ...
but I was mistaken.  Actually, it happens during backend shutdown,
and the reason is that ProcKill (which releases the PGPROC structure
and resets MyProc to NULL) is called before ShutdownBufferPoolAccess.
But the latter tries to acquire the bufmgr LWLock.  If it has to wait,
kaboom.

The ordering of these shutdown hooks is the reverse of the ordering
of the startup initialization of the modules.  It looks like we'll
need to rejigger the startup ordering ... and it also looks like that's
going to be a rather ticklish issue.  (See comments in BaseInit and
InitPostgres.)  Any thoughts on how to do it?
        regards, tom lane


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

Предыдущее
От: "scott.marlowe"
Дата:
Сообщение: Re: PGXLOG variable worthwhile?
Следующее
От: Scott Shattuck
Дата:
Сообщение: Re: Cause of "can't wait without a PROC structure"