diff options
| author | Magnus Hagander | 2018-04-05 16:59:32 +0000 |
|---|---|---|
| committer | Magnus Hagander | 2018-04-05 17:02:45 +0000 |
| commit | eed1ce72e1593d3e8b7461d7744808d4d6bf402b (patch) | |
| tree | 19b57473d3ac769d9e03562924a2ab33ab0bc6b0 /src/include/postmaster | |
| parent | 1664ae1978bf0f5ee940dc2fc8313e6400a7e7da (diff) | |
Allow background workers to bypass datallowconn
THis adds a "flags" field to the BackgroundWorkerInitializeConnection()
and BackgroundWorkerInitializeConnectionByOid(). For now only one flag,
BGWORKER_BYPASS_ALLOWCONN, is defined, which allows the worker to ignore
datallowconn.
Diffstat (limited to 'src/include/postmaster')
| -rw-r--r-- | src/include/postmaster/bgworker.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/include/postmaster/bgworker.h b/src/include/postmaster/bgworker.h index a8753df8d16..9c49bb7f4b0 100644 --- a/src/include/postmaster/bgworker.h +++ b/src/include/postmaster/bgworker.h @@ -140,10 +140,13 @@ extern PGDLLIMPORT BackgroundWorker *MyBgworkerEntry; * If dbname is NULL, connection is made to no specific database; * only shared catalogs can be accessed. */ -extern void BackgroundWorkerInitializeConnection(const char *dbname, const char *username); +extern void BackgroundWorkerInitializeConnection(const char *dbname, const char *username, uint32 flags); /* Just like the above, but specifying database and user by OID. */ -extern void BackgroundWorkerInitializeConnectionByOid(Oid dboid, Oid useroid); +extern void BackgroundWorkerInitializeConnectionByOid(Oid dboid, Oid useroid, uint32 flags); + +/* Flags to BackgroundWorkerInitializeConnection et al */ +#define BGWORKER_BYPASS_ALLOWCONN 1 /* Block/unblock signals in a background worker process */ extern void BackgroundWorkerBlockSignals(void); |
