| From: | p(dot)sun(dot)fun(at)gmail(dot)com |
|---|---|
| To: | "pgsql-sql(at)lists(dot)postgresql(dot)org" <pgsql-sql(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: libpq CREATE DATABASE operation from multiple treads |
| Date: | 2020-10-08 20:46:40 |
| Message-ID: | 47a7c4ffa62aaf2b86854a657f484f33913207c9.camel@gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-sql |
On Thu, 2020-10-08 at 14:43 -0600, Rob Sargent wrote:
>
>
> > On Oct 8, 2020, at 2:41 PM, p(dot)sun(dot)fun(at)gmail(dot)com wrote:
> >
> > On Thu, 2020-10-08 at 14:35 -0600, Rob Sargent wrote:
> > > > On Oct 8, 2020, at 2:30 PM, p(dot)sun(dot)fun(at)gmail(dot)com wrote:
> > > >
> > > > Indeed, this is a FATAL_ERROR. From two threads I got:
> > > >
> > > > // Thread #1
> > > > FATAL_ERROR: ERROR: source database "template1" is being
> > > > accessed
> > > > by
> > > > other users
> > > > DETAIL: There is 1 other session using the database.
> > > >
> > > > // Thread #2
> > > > FATAL_ERROR: ERROR: source database "template1" is being
> > > > accessed
> > > > by
> > > > other users
> > > > DETAIL: There is 1 other session using the database.
> > > >
> > > I would try using dbname=postgres.
> > aaaaand.... it works. Two databases have been created with return
> > status "COMMAND_OK".
> >
> > > If you get the same error, I would say your server is in single
> > > user
> > > mode?
>
> And if you try it again using template1?
>
Nope, the same errors:
// Thread #1
FATAL_ERROR: ERROR: source database "template1" is being accessed by
other users
DETAIL: There is 1 other session using the database.
// Thread #2
FATAL_ERROR: ERROR: source database "template1" is being accessed by
other users
DETAIL: There is 1 other session using the database.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Rob Sargent | 2020-10-08 20:50:31 | Re: libpq CREATE DATABASE operation from multiple treads |
| Previous Message | Rob Sargent | 2020-10-08 20:43:45 | Re: libpq CREATE DATABASE operation from multiple treads |