Re: backend hangs at immediate shutdown

Tatsuo Ishii <ishii@postgresql.org>

From: Tatsuo Ishii <ishii@postgresql.org>
To: andres@2ndquadrant.com
Cc: tgl@sss.pgh.pa.us, maumau307@gmail.com, pgsql-hackers@postgresql.org
Date: 2013-01-31T00:40:12Z
Lists: pgsql-hackers
>> What about adding a caution to the doc something like:
>> 
>> 	 "pg_ctl -m -i stop" may cause a PostgreSQL hang if native laguage support enabled.
> 
> That doesn't entirely solve the problem, see quote and reply in
> 6845.1359561252@sss.pgh.pa.us

Oh, I see now.

> I think adding errmsg_raw() or somesuch that doesn't allocate any memory
> and only accepts constant strings could solve the problem more
> completely, at the obvious price of not allowing translated strings
> directly.
> Those could be pretranslated during startup, but thats mighty ugly.

Are you suggesting to call errmsg_raw() instead of errmsg() in quickdie()?

Tom said:
> That would reduce our exposure slightly, but hardly to zero.  For
> instance, if SIGQUIT happened in the midst of handling a regular error,
> ErrorContext might be pretty full already, necessitating further malloc
> requests.

If I understand this correctly, I don't think errmsg_raw()
solves the particular problem.
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese: http://www.sraoss.co.jp


Commits

  1. Consistency check should compare last record replayed, not last record read.

  2. Update minimum recovery point on truncation.