diff options
author | Michael Paquier | 2023-10-12 00:24:17 +0000 |
---|---|---|
committer | Michael Paquier | 2023-10-12 00:24:17 +0000 |
commit | e7689190b3d58404abbafe2d3312c3268a51cca3 (patch) | |
tree | 4ce8a0d0de6b99fd05ca0ab526fa4ea863d8a4f4 /doc/src | |
parent | b6a77c6a6ccf698787201b001cbbbf9c89fe5715 (diff) |
Add option to bgworkers to allow the bypass of role login check
This adds a new option called BGWORKER_BYPASS_ROLELOGINCHECK to the
flags available to BackgroundWorkerInitializeConnection() and
BackgroundWorkerInitializeConnectionByOid().
This gives the possibility to bgworkers to bypass the role login check,
making possible the use of a role that has no login rights while not
being a superuser. PostgresInit() gains a new flag called
INIT_PG_OVERRIDE_ROLE_LOGIN, taking advantage of the refactoring done in
4800a5dfb4c4.
Regression tests are added to worker_spi to check the behavior of this
new option with bgworkers.
Author: Bertrand Drouvot
Reviewed-by: Nathan Bossart, Michael Paquier, Bharath Rupireddy
Discussion: https://postgr.es/m/bcc36259-7850-4882-97ef-d6b905d2fc51@gmail.com
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/sgml/bgworker.sgml | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/doc/src/sgml/bgworker.sgml b/doc/src/sgml/bgworker.sgml index 9ad1146ba02..2c393385a91 100644 --- a/doc/src/sgml/bgworker.sgml +++ b/doc/src/sgml/bgworker.sgml @@ -201,6 +201,9 @@ typedef struct BackgroundWorker during <command>initdb</command>. If <literal>BGWORKER_BYPASS_ALLOWCONN</literal> is specified as <varname>flags</varname> it is possible to bypass the restriction to connect to databases not allowing user connections. + If <literal>BGWORKER_BYPASS_ROLELOGINCHECK</literal> is specified as + <varname>flags</varname> it is possible to bypass the login check for the + role used to connect to databases. A background worker can only call one of these two functions, and only once. It is not possible to switch databases. </para> |