Thread: bdr admin role
This doc specifies to initdb with the admin user "postgres," http://bdr-project.org/docs/stable/quickstart-instances.html but if I do that the supervisor falls over with: $ cat bdr5598.log LOG: registering background worker "bdr supervisor" LOG: database system was shut down at 2015-09-02 16:04:45 EDT LOG: starting up replication identifier with ckpt at 0/171EBF8 LOG: MultiXact member wraparound protections are now enabled LOG: starting background worker process "bdr supervisor" LOG: autovacuum launcher started LOG: database system is ready to accept connections LOG: Created database bdr_supervisordb (oid=16384) during BDR startup LOG: worker process: bdr supervisor (PID 21666) exited with exit code 1 FATAL: role "postgresql" does not exist LOG: starting background worker process "bdr supervisor" It works if I init with "-U postgresql"
Initdb as user "postgred", not "postgresql"
This doc specifies to initdb with the admin user "postgres,"
http://bdr-project.org/docs/stable/quickstart-instances.html
but if I do that the supervisor falls over with:
$ cat bdr5598.log
LOG: registering background worker "bdr supervisor"
LOG: database system was shut down at 2015-09-02 16:04:45 EDT
LOG: starting up replication identifier with ckpt at 0/171EBF8
LOG: MultiXact member wraparound protections are now enabled
LOG: starting background worker process "bdr supervisor"
LOG: autovacuum launcher started
LOG: database system is ready to accept connections
LOG: Created database bdr_supervisordb (oid=16384) during BDR startup
LOG: worker process: bdr supervisor (PID 21666) exited with exit code 1
FATAL: role "postgresql" does not exist
LOG: starting background worker process "bdr supervisor"
It works if I init with "-U postgresql"
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
http://bdr-project.org/docs/stable/quickstart-instances.html
but if I do that the supervisor falls over with:
$ cat bdr5598.log
LOG: registering background worker "bdr supervisor"
LOG: database system was shut down at 2015-09-02 16:04:45 EDT
LOG: starting up replication identifier with ckpt at 0/171EBF8
LOG: MultiXact member wraparound protections are now enabled
LOG: starting background worker process "bdr supervisor"
LOG: autovacuum launcher started
LOG: database system is ready to accept connections
LOG: Created database bdr_supervisordb (oid=16384) during BDR startup
LOG: worker process: bdr supervisor (PID 21666) exited with exit code 1
FATAL: role "postgresql" does not exist
LOG: starting background worker process "bdr supervisor"
It works if I init with "-U postgresql"
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Oops postgres
On Sep 2, 2015 6:06 PM, "Melvin Davidson" <melvin6925@gmail.com> wrote:
Initdb as user "postgred", not "postgresql"
This doc specifies to initdb with the admin user "postgres,"
http://bdr-project.org/docs/stable/quickstart-instances.html
but if I do that the supervisor falls over with:
$ cat bdr5598.log
LOG: registering background worker "bdr supervisor"
LOG: database system was shut down at 2015-09-02 16:04:45 EDT
LOG: starting up replication identifier with ckpt at 0/171EBF8
LOG: MultiXact member wraparound protections are now enabled
LOG: starting background worker process "bdr supervisor"
LOG: autovacuum launcher started
LOG: database system is ready to accept connections
LOG: Created database bdr_supervisordb (oid=16384) during BDR startup
LOG: worker process: bdr supervisor (PID 21666) exited with exit code 1
FATAL: role "postgresql" does not exist
LOG: starting background worker process "bdr supervisor"
It works if I init with "-U postgresql"
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Please show your connection strings, and the contents of bdr.bdr_nodes and bdr.bdr_connections. On 3 September 2015 at 05:00, Ray Stell <stellr@vt.edu> wrote: > This doc specifies to initdb with the admin user "postgres," > http://bdr-project.org/docs/stable/quickstart-instances.html > but if I do that the supervisor falls over with: > $ cat bdr5598.log > LOG: registering background worker "bdr supervisor" > LOG: database system was shut down at 2015-09-02 16:04:45 EDT > LOG: starting up replication identifier with ckpt at 0/171EBF8 > LOG: MultiXact member wraparound protections are now enabled > LOG: starting background worker process "bdr supervisor" > LOG: autovacuum launcher started > LOG: database system is ready to accept connections > LOG: Created database bdr_supervisordb (oid=16384) during BDR startup > LOG: worker process: bdr supervisor (PID 21666) exited with exit code 1 > FATAL: role "postgresql" does not exist > LOG: starting background worker process "bdr supervisor" > > It works if I init with "-U postgresql" > > > -- > Sent via pgsql-general mailing list (pgsql-general@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-general -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services
On 9/3/15 11:36 PM, Craig Ringer wrote: > Please show your connection strings, and the contents of bdr.bdr_nodes > and bdr.bdr_connections. > > On 3 September 2015 at 05:00, Ray Stell <stellr@vt.edu> wrote: >> This doc specifies to initdb with the admin user "postgres," >> http://bdr-project.org/docs/stable/quickstart-instances.html >> but if I do that the supervisor falls over with: >> $ cat bdr5598.log >> LOG: registering background worker "bdr supervisor" >> LOG: database system was shut down at 2015-09-02 16:04:45 EDT >> LOG: starting up replication identifier with ckpt at 0/171EBF8 >> LOG: MultiXact member wraparound protections are now enabled >> LOG: starting background worker process "bdr supervisor" >> LOG: autovacuum launcher started >> LOG: database system is ready to accept connections >> LOG: Created database bdr_supervisordb (oid=16384) during BDR startup >> LOG: worker process: bdr supervisor (PID 21666) exited with exit code 1 >> FATAL: role "postgresql" does not exist >> LOG: starting background worker process "bdr supervisor" >> >> It works if I init with "-U postgresql" Forgive me, I'm a little confused by your request. As a general rule, I never use the commonly used defaults for the admin usename. That's just a long standing behavior of mine in most environments. The less the black hats know, the better. So, if I initdb with "-U fred" or whatever, I would expect that to be detected by the bdr process, rather than hardcoding some default value. At the point of startup with pg_ctl, there is no connection string or nodes in play. The log records I posted were right after the "pg_ctl ... start" of the first db. I was walking through the demo exercise here and silly me changed the admin role name without thinking about it. I was just reporting that it seems to be only working if the admin value is this default. The demo works fine if I use the string "postgresql" as the admin role. It looks like you might want to build -U support into bdr at some point. I did build from source as we use some non-standard flags locally, so maybe something is amiss in my build? I'll try to go back and use the pre-built software sometime soon. Ray
On 4 September 2015 at 21:46, Ray Stell <stellr@vt.edu> wrote: >>>> FATAL: role "postgresql" does not exist >>> >>> It works if I init with "-U postgresql" > > The demo works fine if > I use the string "postgresql" as the admin role. It looks like you might > want to build -U support into bdr at some point. It's not at all clear to me how this is happening. The string "postgresql" isn't hardcoded by BDR anywhere that it could conceivably be passed as a username for a connection string, so I'm not sure what's going on. I've never used "postgresql" as the default superuser name. Typically I use "postgres". I don't see anything particularly informative in the main PostgreSQL sources that could explain it either. We pass "postgresql" as the PGSQL_PAM_SERVICE and use it as the default RADIUS identifier, but I fail to see how those could get passed as the login role identifier. Are you running it under a unix user named "postgresql", by any chance? -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services
On 9/6/15 10:55 PM, Craig Ringer wrote: > On 4 September 2015 at 21:46, Ray Stell <stellr@vt.edu> wrote: >>>>> FATAL: role "postgresql" does not exist >>>> It works if I init with "-U postgresql" >> The demo works fine if >> I use the string "postgresql" as the admin role. It looks like you might >> want to build -U support into bdr at some point. > It's not at all clear to me how this is happening. The string > "postgresql" isn't hardcoded by BDR anywhere that it could conceivably > be passed as a username for a connection string, so I'm not sure > what's going on. > > I've never used "postgresql" as the default superuser name. Typically > I use "postgres". > > I don't see anything particularly informative in the main PostgreSQL > sources that could explain it either. We pass "postgresql" as the > PGSQL_PAM_SERVICE and use it as the default RADIUS identifier, but I > fail to see how those could get passed as the login role identifier. > > Are you running it under a unix user named "postgresql", by any chance? Yes.
On 7 September 2015 at 20:34, Ray Stell <stellr@vt.edu> wrote: > > > On 9/6/15 10:55 PM, Craig Ringer wrote: >> >> On 4 September 2015 at 21:46, Ray Stell <stellr@vt.edu> wrote: >>>>>> >>>>>> FATAL: role "postgresql" does not exist >>>>> >>>>> It works if I init with "-U postgresql" >>> >>> The demo works fine if >>> I use the string "postgresql" as the admin role. It looks like you might >>> want to build -U support into bdr at some point. >> >> It's not at all clear to me how this is happening. The string >> "postgresql" isn't hardcoded by BDR anywhere that it could conceivably >> be passed as a username for a connection string, so I'm not sure >> what's going on. >> >> I've never used "postgresql" as the default superuser name. Typically >> I use "postgres". >> >> I don't see anything particularly informative in the main PostgreSQL >> sources that could explain it either. We pass "postgresql" as the >> PGSQL_PAM_SERVICE and use it as the default RADIUS identifier, but I >> fail to see how those could get passed as the login role identifier. >> >> Are you running it under a unix user named "postgresql", by any chance? > > Yes. Hm, ok. So somewhere a connection string lacks a 'user=' entry, and libpq is defaulting to the operating system user name, which doesn't exist as database user. I don't see this in my tests. Can you confirm the exact BDR version you're testing/using? "git rev-parse --short HEAD" and "git branch" please. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services
On 9/8/15 2:33 AM, Craig Ringer wrote: > On 7 September 2015 at 20:34, Ray Stell <stellr@vt.edu> wrote: >> >> On 9/6/15 10:55 PM, Craig Ringer wrote: >>> On 4 September 2015 at 21:46, Ray Stell <stellr@vt.edu> wrote: >>>>>>> >>>>>>> >>>>>>> I don't see this in my tests. Can you confirm the exact BDR version >>>>>>> you're testing/using? "git rev-parse --short HEAD" and "git branch" >>>>>>> please. >>>>>>> $ git rev-parse --short HEAD 6a60690 $ git branch * bdr-pg/REL9_4_STABLE
> $ git rev-parse --short HEAD > 6a60690 > > $ git branch > * bdr-pg/REL9_4_STABLE OK, that's PostgreSQL. What about the BDR extension its self? SELECT bdr.bdr_version() will show you if you're starting up OK, otherwise again the git rev please. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services
On 9/9/15 1:43 AM, Craig Ringer wrote: >> $ git rev-parse --short HEAD >> 6a60690 >> >> $ git branch >> * bdr-pg/REL9_4_STABLE > OK, that's PostgreSQL. What about the BDR extension its self? > > SELECT bdr.bdr_version() will show you if you're starting up OK, > otherwise again the git rev please. > bdrdemo=# SELECT bdr.bdr_version() ; bdr_version -------------------------- 0.9.2-2015-09-02-d568640 (1 row)