Re: Function call crashes server

Поиск
Список
Период
Сортировка
Искать
От
Tom Lane
Тема
Re: Function call crashes server
Дата
Msg-id
10268.1016687335@sss.pgh.pa.us
Ответ на
Список
Дерево обсуждения
Re: Function call crashes server "Zeugswetter Andreas SB SD" <ZeugswetterA@spardat.at>
Re: Function call crashes server Tom Lane <tgl@sss.pgh.pa.us>
Bruce Momjian  writes:
> If I do this as any user:
> 	SELECT update_pg_pwd();
> it crashes all backends and causes a server-wide restart.  Is this
> acceptable behavior?

There are a number of things we might blame this on, all having to do
with the overuse of type OID zero to mean too many different things.
But my attention is currently focused on this tidbit in ExecTypeFromTL:
           TupleDescInitEntry(typeInfo,                              resdom->resno,                              resdom->resname,           /* fix for SELECT NULL ... */                              (restype ? restype : UNKNOWNOID),                              resdom->restypmod,                              0,                              false);

Had ExecTypeFromTL rejected restype = 0 rather than substituting
UNKNOWNOID (a pretty durn random response, IMHO), we'd not see this
crash.

The "fix for SELECT NULL" appears to have been committed by you
on 7 Dec 1996.  Care to explain it?

(AFAICT, "SELECT NULL" does not produce a zero at this point now,
though perhaps it did in 1996.  Or was there some other case you
were defending against back then?)
		regards, tom lane

В списке pgsql-hackers по дате отправления
От: nconway@klamath.dyndns.org (Neil Conway)
Дата:
Сообщение: Re: [GENERAL] Notify argument?
От: Bruce Momjian
Дата:
FAQ