pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Teodor Sigaev <teodor@sigaev.ru>
To: Magnus Hagander <magnus@hagander.net>
To: pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Allow background workers to bypass datallowconn
Date: Thu, 5 Apr 2018 20:11:44 +0300
Message-ID: <07be884c-6415-4868-4253-15a97d60071f@sigaev.ru> (raw)
In-Reply-To: <E1f48JB-0001zZ-Nm@gemulon.postgresql.org>
References: <E1f48JB-0001zZ-Nm@gemulon.postgresql.org>

Something goes wrong

https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=crake&dt=2018-04-05 
17%3A07%3A19

Apr 05 13:09:08 
/home/bf/bfr/root/HEAD/pgsql.build/../pgsql/src/test/modules/worker_spi/worker_spi.c: 
In function ‘worker_spi_main’:
Apr 05 13:09:08 
/home/bf/bfr/root/HEAD/pgsql.build/../pgsql/src/test/modules/worker_spi/worker_spi.c:182:2: 
error: too few arguments to function ‘BackgroundWorkerInitializeConnection’
Apr 05 13:09:08   BackgroundWorkerInitializeConnection("postgres", NULL);
Apr 05 13:09:08   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Apr 05 13:09:08 In file included from 
/home/bf/bfr/root/HEAD/pgsql.build/../pgsql/src/test/modules/worker_spi/worker_spi.c:27:0:
Apr 05 13:09:08 
/home/bf/bfr/root/HEAD/pgsql.build/../pgsql/src/include/postmaster/bgworker.h:143:13: 
note: declared here
Apr 05 13:09:08  extern void BackgroundWorkerInitializeConnection(const char 
*dbname, const char *username, uint32 flags);
Apr 05 13:09:08              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Apr 05 13:09:08 <builtin>: recipe for target 'worker_spi.o' failed

Magnus Hagander wrote:
> 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.
> 
> Branch
> ------
> master
> 
> Details
> -------
> https://git.postgresql.org/pg/commitdiff/eed1ce72e1593d3e8b7461d7744808d4d6bf402b
> 
> Modified Files
> --------------
> contrib/pg_prewarm/autoprewarm.c           |  2 +-
> src/backend/access/transam/parallel.c      |  3 ++-
> src/backend/bootstrap/bootstrap.c          |  2 +-
> src/backend/postmaster/autovacuum.c        |  4 ++--
> src/backend/postmaster/postmaster.c        |  8 ++++----
> src/backend/replication/logical/launcher.c |  2 +-
> src/backend/replication/logical/worker.c   |  3 ++-
> src/backend/tcop/postgres.c                |  2 +-
> src/backend/utils/init/postinit.c          | 10 +++++-----
> src/include/miscadmin.h                    |  2 +-
> src/include/postmaster/bgworker.h          |  7 +++++--
> 11 files changed, 25 insertions(+), 20 deletions(-)
> 

-- 
Teodor Sigaev                                   E-mail: teodor@sigaev.ru
                                                    WWW: http://www.sigaev.ru/




view thread (3+ messages)  latest in thread

Message-ID: <07be884c-6415-4868-4253-15a97d60071f@sigaev.ru>
Permalink:  ../07be884c-6415-4868-4253-15a97d60071f@sigaev.ru/
Also on:    postgresql.org/message-id/07be884c-6415-4868-4253-15a97d60071f@sigaev.ru

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: teodor@sigaev.ru, magnus@hagander.net
  Subject: Re: pgsql: Allow background workers to bypass datallowconn
  In-Reply-To: <07be884c-6415-4868-4253-15a97d60071f@sigaev.ru>
  References: <E1f48JB-0001zZ-Nm@gemulon.postgresql.org> <07be884c-6415-4868-4253-15a97d60071f@sigaev.ru>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox