Allow workers to override datallowconn

Поиск
Список
Период
Сортировка
От Magnus Hagander
Тема Allow workers to override datallowconn
Дата
Msg-id CABUevEwWT9ZmonBMRFF0owneoN3DAPgOVzwHAN0bUkxaqY3eNQ@mail.gmail.com
обсуждение исходный текст
Ответы Re: Allow workers to override datallowconn
Re: Allow workers to override datallowconn
Список pgsql-hackers
In working on the checksumhelper patch, we came across wanting a background worker to be allowed to bypass datallowconn for a database. Right now we didn't take care of that, and just said "you have to ALTER TABLE" first.

Specifically for this usecase that is OK, but not paticularly user friendly. And I think this is a use that can also be useful for other things.

Attached is a patch that adds new Override versions of the functions to connect to a database from a background worker.

Another option would be to just add the parameter directly to the regular connection function, and not create separate functions. But that would make it an incompatible change. And since background workers are commonly used in extensions, that would break a lot of extensions out there. I figured it's probably not worth doing that, and thus added the new functions. What do others think about that?

Are there any other caveats in doing that this actually makes it dangerous to just allow bypassing it for extensions?

--
Вложения

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

Предыдущее
От: Ioseph Kim
Дата:
Сообщение: Re: Translations contributions urgently needed
Следующее
От: Tom Lane
Дата:
Сообщение: Re: ERROR: left and right pathkeys do not match in mergejoin