I realized the truth of $SUBJECT while reading this report:
In a standalone backend, postgres.c tries to run StartupXLOG after
having done only BaseInit(), which means that we don't have a PGPROC
(hence can't take LWLocks much less heavyweight locks) and we have not
totally finished initializing the bufmgr either. This is apparently
enough for the "normal" case where there's no log replay to do; but
as the above report shows, it's completely inadequate for some of the
more complex code paths in replay. I suspect this has been broken
from the beginning.
Fixing this will require rearranging things around InitPostgres
(in particular, I think InitBufferPoolBackend will have to be
called directly from postgres.c). Since that code got rearranged
quite a bit last month, I'd be hesitant to try to back-patch whatever
fix we come up with for HEAD. Seeing that we'd never noticed the
problem before, I think it's okay to fix it just in HEAD and not
risk back-patching ... comments?
Also, does this have any impact on the Hot Standby stuff?
regards, tom lane
pgsql-hackers by date
|Next:||From: Marcos Luis Ortiz Valmaseda||Date: 2009-09-19 17:27:00|
|Subject: Re: Crypto|
|Previous:||From: Tom Lane||Date: 2009-09-19 16:33:36|
|Subject: Re: Crypto |