Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hpCwi-0001jn-Kq for pgsql-admin@arkaria.postgresql.org; Sun, 21 Jul 2019 14:36:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hpCwg-00034d-3u for pgsql-admin@arkaria.postgresql.org; Sun, 21 Jul 2019 14:36:14 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hpCwf-00034V-R5 for pgsql-admin@lists.postgresql.org; Sun, 21 Jul 2019 14:36:13 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hpCwd-00042D-7D for pgsql-admin@postgresql.org; Sun, 21 Jul 2019 14:36:12 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id x6LEa6q0001375; Sun, 21 Jul 2019 10:36:06 -0400 From: Tom Lane To: Avin Kavish cc: jmz , "David G. Johnston" , pgsql-admin@postgresql.org Subject: Re: Database.Schema.Table In-reply-to: References: Comments: In-reply-to Avin Kavish message dated "Sun, 21 Jul 2019 11:20:35 +0530" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1373.1563719766.1@sss.pgh.pa.us> Date: Sun, 21 Jul 2019 10:36:06 -0400 Message-ID: <1374.1563719766@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Avin Kavish writes: > On Sun, Jul 21, 2019 at 10:24 AM jmz wrote: >> Thank you for the clarification David. I really thought this would be >> easier to implement since rest of the architecture (within DB) doesn't need >> any (or little) change. > If you are referring to cross database queries using that syntax wouldn't > that require reworking the transaction system to work across db's to > guarantee ACIDity? The transaction system wouldn't particularly care, since XIDs are cluster-wide already. However, there is no provision at all for cross-database catalog access, and that's where the problems would start. As an example, there is an assumption throughout the backend that table names can be resolved into OIDs at parse time and the OID is a sufficiently unique identifier from then on. But an OID is a lookup key for only one database's pg_class catalog. There's no guarantee that table OIDs are unique across databases, much less any efficient way to find the referent of an OID that perhaps points into some other database's pg_class. Likewise for functions. Likewise for operators, and most other sorts of named entities. The only things for which OIDs are effectively cluster-wide are the object types tracked in shared catalogs (roles, tablespaces, databases). You could imagine, perhaps, converting *all* the catalogs to be shared across databases, but that's not going to happen for a number of good reasons, such as performance, reliability, and security. In short, the OP's notion that this would be a minor change is utterly uninformed. I'd put the odds that it ever happens at epsilon. regards, tom lane