Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tlG38-00AUPX-W4 for pgsql-admin@arkaria.postgresql.org; Thu, 20 Feb 2025 23:33:46 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tlG36-00FIUz-LE for pgsql-admin@arkaria.postgresql.org; Thu, 20 Feb 2025 23:33:44 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tlG36-00FIUT-AK for pgsql-admin@lists.postgresql.org; Thu, 20 Feb 2025 23:33:44 +0000 Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tlG34-001yzE-1q for pgsql-admin@lists.postgresql.org; Thu, 20 Feb 2025 23:33:43 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=momjian.us; s=2025010100; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description; bh=lPbip5G6Gf/1Zvk36PIUoDSzxGl4+4VMvl6X9CAUGH8=; b=XCYSB I5tAJkTnpJu/QTmieD8hBCDQkD62nEqU1Ah3JyIyCqb53dnDtceSNipPPg7x3iaIXnEIGtvhGf7hK k/xemRaNgfkaMBJe9MJu47s5JhxztofEZaVNdIIhGiXmX2YfVcQOaLXOlx/Jtl7SMP75f/iCKG6Ix 7IYJ/CJ/F0nbHFIFbyFrXG2/Xih5lS52ffTJ74Fbbo7LNYT0E6a83MigEvmlfg43Y5XvqaEzZSs0l AYyczWQeT5Mhl701AnR/JYv93w/crsH38uqtCEDGJv1E7+IQ/nEAluwYhLe/Gzde5pj9lGk+gwuFt 2sEHqxIVRFt+ex8vQSIELe70jBmpQ==; Received: from bruce by momjian.us with local (Exim 4.96) (envelope-from ) id 1tlG32-004FC4-1c; Thu, 20 Feb 2025 18:33:40 -0500 Date: Thu, 20 Feb 2025 18:33:40 -0500 From: Bruce Momjian To: Laurenz Albe Cc: Edwin UY , pgsql-admin@lists.postgresql.org Subject: Re: Create a Database or a Schema -- when to do what? Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, Feb 14, 2025 at 06:26:21AM +0100, Laurenz Albe wrote: > On Fri, 2025-02-14 at 17:45 +1300, Edwin UY wrote: > > When do you decide whether to create a database or a schema? > > You can still create privs, access and security on the schema level, can't you? > > Yes, you can. > However, the separation between databases is stronger. > For example, some people take offence if others can see their metadata. > > My recommendation is to use different databases whenever you are > dealing with distinct data sets and different applications. > But if you have data sets that you routinely need to join, > it is better to have them in a single database. This blog post might help: https://momjian.us/main/blogs/pgblog/2012.html#April_23_2012 -- Bruce Momjian https://momjian.us EDB https://enterprisedb.com Do not let urgent matters crowd out time for investment in the future.