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 1kQcyo-0001ln-P5 for pgsql-sql@arkaria.postgresql.org; Thu, 08 Oct 2020 20:57:38 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kQcyn-0005r2-MG for pgsql-sql@arkaria.postgresql.org; Thu, 08 Oct 2020 20:57:37 +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 1kQcyn-0005qv-Fu for pgsql-sql@lists.postgresql.org; Thu, 08 Oct 2020 20:57:37 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kQcyl-00005a-BO for pgsql-sql@lists.postgresql.org; Thu, 08 Oct 2020 20:57:36 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 098KvYmp2631122; Thu, 8 Oct 2020 16:57:34 -0400 From: Tom Lane To: p.sun.fun@gmail.com cc: pgsql-sql@lists.postgresql.org Subject: Re: libpq CREATE DATABASE operation from multiple treads In-reply-to: References: <390804abe88e4e9da9049f6e05c841783acaca47.camel@gmail.com> <124ce8dff8402159f20dec1bc1ac27e26ee39c23.camel@gmail.com> <2624889.1602189369@sss.pgh.pa.us> Comments: In-reply-to p.sun.fun@gmail.com message dated "Thu, 08 Oct 2020 15:52:22 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2631120.1602190654.1@sss.pgh.pa.us> Date: Thu, 08 Oct 2020 16:57:34 -0400 Message-ID: <2631121.1602190654@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk p.sun.fun@gmail.com writes: > On Thu, 2020-10-08 at 16:36 -0400, Tom Lane wrote: >> You'd be better off to connect to some other database than template1; > What would be the best strategy to create a database from user > standpoint of view? Connect to the postgres database. That's what it's there for. regards, tom lane