Re: [PATCH] lock_timeout and common SIGALRM framework
От | Alvaro Herrera |
---|---|
Тема | Re: [PATCH] lock_timeout and common SIGALRM framework |
Дата | |
Msg-id | 1341415105-sup-6185@alvh.no-ip.org обсуждение исходный текст |
Ответ на | Re: [PATCH] lock_timeout and common SIGALRM framework (Boszormenyi Zoltan <zb@cybertec.at>) |
Ответы |
Re: [PATCH] lock_timeout and common SIGALRM framework
|
Список | pgsql-hackers |
Excerpts from Boszormenyi Zoltan's message of mié jul 04 06:32:46 -0400 2012: > 2012-07-04 12:09 keltezéssel, Boszormenyi Zoltan írta: > > You just broke initdb with this cleanup. :-) Ouch. > > initdb starts postgres --single, that doesn't do BackendInitialize(), > > only PostgresMain(). So, you need InitializeTimeouts() before > > the RegisterTimeout() calls in PostgresMain and the elog(PANIC) > > must not be in InitializeTimeouts() if called twice. > > Attached is the fix for this problem. PostgresMain() has a new > argument: bool single_user. This way, InitializeTimeouts() can > keep its elog(PANIC) if called twice and "postgres --single" > doesn't fail its Assert() in RegisterTimeout(). Hmm. Maybe it's better to leave InitializeTimeouts to be called twice after all. The fix seems a lot uglier than the disease it's curing. -- Álvaro Herrera <alvherre@commandprompt.com> The PostgreSQL Company - Command Prompt, Inc. PostgreSQL Replication, Consulting, Custom Development, 24x7 support
В списке pgsql-hackers по дате отправления: