Re: [BUGS] your mail

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: [BUGS] your mail
Дата
Msg-id 20170808201838.vt5lyujd3fvgtxyq@alap3.anarazel.de
обсуждение исходный текст
Ответ на [BUGS]  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [BUGS] your mail
Список pgsql-bugs
On 2017-08-08 16:15:15 -0400, Tom Lane wrote:
> Andres Freund <andres@anarazel.de> writes:
> > Perhaps, for v11, we should actually make sure there's no memory context
> > etc set during _PG_init() to catch such problems earlier?
> 
> I don't see much of a way to do that in the "typical" case where
> the library load happens as a result of a SQL command.  You can't
> just say "oh, we're not in a transaction" and then later "wait,
> yes we are".

Transaction seems hard, but setting CurrentMemoryContext = NULL during
library load seems quite possible. And that'll cause a lot of code that
assumes an in-progress transaction to fail.

> Maybe we should recommend that extension authors test their libraries
> in the preload scenario ...

That probably won't hurt. A quick search in the docs doesn't turn up any
evidence of us having documented that you shouldn't do database access
in _PG_init()...

Greetings,

Andres Freund


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: [BUGS]
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [BUGS] your mail