Andrew Geery <andrew.ge...@gmail.com> writes: > The schema below crashes pretty reliably for me.
OK ... so the problem is that the function uses the pg_settings view, which results in calling show_all_settings(), and in particular it runs show_session_authorization(), which then dumps core because session_authorization_string is NULL in an autovacuum process. As far as a fix for the crash goes, I'm not sure if it'd be better to try to make show_session_authorization() return some sort of default value in this scenario, or to try to ensure that the variable has been set to something valid before we start running user-supplied code. In either case the problem is potentially wider than this one function and variable. Thoughts anyone? As far as the function itself goes, ISTM you ought to rethink it, because this looks like the very opposite of immutable to me: > create or replace function get_fts_config_name() returns regconfig as $$ > select setting::regconfig from pg_settings > where name = 'default_text_search_config'; > $$ language sql immutable; That's no excuse for the backend crashing, of course, but I would not be surprised at all if you end up with corrupt indexes due to the allegedly-immutable value changing. regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs