public inbox for pgsql-general@postgresql.org  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Ron Johnson <ronljohnsonjr@gmail.com>
Cc: pgsql-general@postgresql.org <pgsql-general@postgresql.org>
Subject: Re: Suggestion for Easier Cross-Database Query Handling in PostgreSQL
Date: Fri, 15 May 2026 19:22:58 -0400
Message-ID: <1439462.1778887378@sss.pgh.pa.us> (raw)
In-Reply-To: <CANzqJaBVAykTGq8j-gijJS-L0bK7duyO-k2xKgr8ZmO9mqxXMw@mail.gmail.com>
References: <CAHWFTRjCy3U30whQJBw8z5_8boq=V9MzbtHMh6HZVP3o-OaGxg@mail.gmail.com>
	<F93CFB3A-0269-4261-804C-0CBAB5DF089D@elevarq.com>
	<CANzqJaBVAykTGq8j-gijJS-L0bK7duyO-k2xKgr8ZmO9mqxXMw@mail.gmail.com>

Ron Johnson <ronljohnsonjr@gmail.com> writes:
> Why doesn't the shared OID space make cross-database queries possible?

OIDs are not guaranteed unique across databases.  To make this work
transparently, we'd have to change all internal APIs to use database
OID + object OID, not just object OID, as object identifiers.  That
would be horrendously invasive, not to mention probably costly in
performance (by doubling the width of cache keys, for instance).

But totally independently of implementation considerations, it's not
apparent to me that this would be a good idea.  As Frank mentioned,
Postgres has always treated databases as isolation boundaries.
Changing that would probably break a lot of peoples' installation
designs.

			regards, tom lane





reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-general@postgresql.org
  Cc: tgl@sss.pgh.pa.us, ronljohnsonjr@gmail.com
  Subject: Re: Suggestion for Easier Cross-Database Query Handling in PostgreSQL
  In-Reply-To: <1439462.1778887378@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox