Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kQcdK-0000ow-3A for pgsql-sql@arkaria.postgresql.org; Thu, 08 Oct 2020 20:35:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kQcdI-0008HE-Vr for pgsql-sql@arkaria.postgresql.org; Thu, 08 Oct 2020 20:35:24 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kQcdI-0008H7-Py for pgsql-sql@lists.postgresql.org; Thu, 08 Oct 2020 20:35:24 +0000 Received: from mail-oi1-x242.google.com ([2607:f8b0:4864:20::242]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1kQcdC-0008Lo-9a for pgsql-sql@lists.postgresql.org; Thu, 08 Oct 2020 20:35:23 +0000 Received: by mail-oi1-x242.google.com with SMTP id u126so7684677oif.13 for ; Thu, 08 Oct 2020 13:35:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=IR5YeTUR4GTidDazUCmcBv4PE3xae4hyyMCJtF+Iwu0=; b=o+7x/0Rcx8afc/H3e6mtuJE1hLTdVwGdz73UGHZ8pOWToREJlXs56EWEPONyfSbiRk ZvsLZ+WGvtAshtKFgiH7cAoOf78XOHJSuDAl0VumCRewjyLZNRMWqpDszDLPBbj3DawV P704Wskkf1q2hXOiFXtCgJlhhYYboPrGX03I74NhLmb3f6z3WBGEX6ynANsCH1r+0ZgZ fSxCDszHpEV1+KBkas1N2dFsWwbHQZPmo+Go3tFjq1L9XemIaTytISU5VarWzKzMUim5 fYbxQ7vpfp0mdOzoIQcdqnwOD3684fr43hMbvGv8ndi+3rSU0d9Ey0+yYpBYho263CkF 4ghA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=IR5YeTUR4GTidDazUCmcBv4PE3xae4hyyMCJtF+Iwu0=; b=NPRbaTkpNwjkAQ7VS6V1wwqFiAmspgojq/VkGsWHknittlFYBtLLKn64xYqOzCv0BI x0b/FA//anKBfY7eNVmCb21XLHueWxS61WVFYgDZqbpHAocINjv0gZnCUVnBr/ZW1k6+ 7oubYwZn2fX6o4FsddHkhVSzWtAHTE6uQpEcGYqWNldWI4DcODYTv0ArUHwkDfa1g5x4 G+dLsJ3GUbEZkSVk6MOek/v/4XH82MKucHv3qP0950vb3JCiCo9wUUSi2+7nI8hzAgh+ Rcv4BcvK/m9QCsfq3lEI0Z+YKFH1ADfNrQOzOopv+dkoVBTXrHfwU5jcC2sC6Gu6f00m 0GUA== X-Gm-Message-State: AOAM531mdwY34t50OKrDYLX6qFOL8AyUV44yebLeb/sc3u5ykjdL4Gbb sg4fe9YnyD54Cr6DyJLfCI4= X-Google-Smtp-Source: ABdhPJxv7mG6HYheBpqFxZlO+sohz5bmyFVoK6HOL8TKVr1uqCut6YCyLfnfiStKDj9TAwDKW8R52Q== X-Received: by 2002:aca:3f09:: with SMTP id m9mr417444oia.1.1602189317839; Thu, 08 Oct 2020 13:35:17 -0700 (PDT) Received: from ?IPv6:2601:681:5500:dde0:44cf:1e8:85cb:69cf? ([2601:681:5500:dde0:44cf:1e8:85cb:69cf]) by smtp.gmail.com with ESMTPSA id a192sm1918027ooc.12.2020.10.08.13.35.17 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 08 Oct 2020 13:35:17 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\)) Subject: Re: libpq CREATE DATABASE operation from multiple treads From: Rob Sargent In-Reply-To: <124ce8dff8402159f20dec1bc1ac27e26ee39c23.camel@gmail.com> Date: Thu, 8 Oct 2020 14:35:16 -0600 Cc: pgsql-sql@lists.postgresql.org Content-Transfer-Encoding: quoted-printable Message-Id: <96718FB0-E258-4342-BD6E-BCE6603BCBD5@gmail.com> References: <390804abe88e4e9da9049f6e05c841783acaca47.camel@gmail.com> <124ce8dff8402159f20dec1bc1ac27e26ee39c23.camel@gmail.com> To: p.sun.fun@gmail.com X-Mailer: Apple Mail (2.3608.120.23.2.4) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk > On Oct 8, 2020, at 2:30 PM, p.sun.fun@gmail.com wrote: >=20 > Indeed, this is a FATAL_ERROR. =46rom two threads I got: >=20 > // Thread #1 > FATAL_ERROR: ERROR: source database "template1" is being accessed by > other users > DETAIL: There is 1 other session using the database. >=20 > // Thread #2 > FATAL_ERROR: ERROR: source database "template1" is being accessed by > other users > DETAIL: There is 1 other session using the database. >=20 I would try using dbname=3Dpostgres. If you get the same error, I would = say your server is in single user mode?