7.4.3 server panic

Поиск
Список
Период
Сортировка
От Chris Ochs
Тема 7.4.3 server panic
Дата
Msg-id 015101c47f1a$557b07a0$250a8b0a@chris
обсуждение исходный текст
Ответы Re: 7.4.3 server panic  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
I have been able to crash the server a few times with the following function
when it is called on a user and schema that was recently deleted.  Following
is a log of what happened and also the function that was called.  This is
7.4.3 on Freebsd 5.2.1.  It doesn't always panic when it encounters a
deleted user/schema, it's kind of sporadic but happens often enough that
it's easy to duplicate.

Chris

----------------------------------------------------------------------------
------
CREATE OR REPLACE FUNCTION setuser(varchar) RETURNS integer AS
'
DECLARE
   in_username ALIAS FOR \$1;
BEGIN
   EXECUTE ''SET SESSION AUTHORIZATION '' || in_username;
   EXECUTE ''SET SEARCH_PATH TO '' || in_username || '',PUBLIC'';
   RETURN 1;
END '
LANGUAGE 'plpgsql';

----------------------------------------------------------------------------
-----
LOG:  statement:                                               select * from
setuser('support')
LOG:  statement: SET SESSION AUTHORIZATION support
CONTEXT:  PL/pgSQL function "setuser" line 4 at execute statement
LOG:  statement: SET SEARCH_PATH TO support,PUBLIC
CONTEXT:  PL/pgSQL function "setuser" line 5 at execute statement
ERROR:  schema "support" does not exist
CONTEXT:  PL/pgSQL function "setuser" line 5 at execute statement
STATEMENT:                                                select * from
setuser('support')
ERROR:  invalid user ID: 194
PANIC:  error during error recovery, giving up
LOG:  server process (PID 38302) was terminated by signal 6
LOG:  terminating any other active server processes
WARNING:  terminating connection because of crash of another server process
DETAIL:  The postmaster has commanded this server process to roll back the
current transaction and exit, because another server process exited
 abnormally and possibly corrupted shared memory.
HINT:  In a moment you should be able to reconnect to the database and
repeat your command.



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Postgres update with self join
Следующее
От: Franco Bruno Borghesi
Дата:
Сообщение: Re: Postgres update with self join