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 1qyKjp-007h4S-Ls for pgsql-docs@arkaria.postgresql.org; Wed, 01 Nov 2023 23:35:05 +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 1qyKjo-009ag3-7U for pgsql-docs@arkaria.postgresql.org; Wed, 01 Nov 2023 23:35:04 +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 1qyKjn-009add-Vk for pgsql-docs@lists.postgresql.org; Wed, 01 Nov 2023 23:35:03 +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.94.2) (envelope-from ) id 1qyKjk-003WDB-Uy for pgsql-docs@lists.postgresql.org; Wed, 01 Nov 2023 23:35:02 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=momjian.us; s=2023062407; 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=whPXYdctKJRxPY2h/49+wzWen2RuLV9xiIpAuF6HLZY=; b=qwzxi /bGwV1vGVbHQajczsH57rEYe5HXlHs6TPUBat+KAzx1p+fqqREiYUwifLshYdS/nc4vx12MPKU9Nu gKAIFqZu2OB1j67FjPpPFri1D6zxw74jsGuXw/mg2VTbGK3drPncg/cZei5hhkhnfhdtZrYa9+bGE 8pRo6G+k9pBIkB2qFonUmUda6+wusYxEjD3l2EJ2q+J+OttXs8ja30X6M3jc1dbcD2jISgIoIC+Md 2GLLNPdr0ZbiHeV00Ly+f1xZ4Pk/hmbueyZ5N7nYKHL9yFk4Q4L4PQNeP5aBjpuwhSnvE9n4gZ//j CyJkAmuoXFJDmoqS6gDBALIfNdobQ==; Received: from bruce by momjian.us with local (Exim 4.96) (envelope-from ) id 1qyKjj-00A23z-1d; Wed, 01 Nov 2023 19:34:59 -0400 Date: Wed, 1 Nov 2023 19:34:59 -0400 From: Bruce Momjian To: Tom Lane Cc: "David G. Johnston" , "zhoushulin1992@gmail.com" , "pgsql-docs@lists.postgresql.org" Subject: Re: 'pg_global' cannot be used as default_tablespace. Message-ID: References: <160499688847.25495.8682880307938679648@wrigleys.postgresql.org> <2878751.1698877957@sss.pgh.pa.us> <2883160.1698880368@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2883160.1698880368@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, Nov 1, 2023 at 07:12:48PM -0400, Tom Lane wrote: > Bruce Momjian writes: > > On Wed, Nov 1, 2023 at 06:32:37PM -0400, Tom Lane wrote: > >> But it *is* permissible, unless we add code to reject it during > >> SET as Bruce mentioned. Which seems fairly pointless to me. It's not > >> like there is anything unclear about the CREATE TABLE error message. > > > Yeah, from the report I thought something bad happened if you tried to > > use it and that is why we had to document it. By documenting it we are > > just giving the user advice before they get the error. I wrote up this > > minimal patch which might have the right level of detail to avoid > > errors, if people think this is useful. > > I think this will lead to just as much confusion, because people > will read it and expect that SET will fail. > > If we need to document any more than we have now, we should point > out in the CREATE TABLE man page that you can't create a table in > the pg_global tablespace. That will cover both this case and the > case of trying to select pg_global explicitly in the CREATE. > > Another idea could be to adjust this bit in manage-ag.sgml: > > Two tablespaces are automatically created when the database cluster > is initialized. The > - pg_global tablespace is used for shared system catalogs. The > + pg_global tablespace is used for shared system catalogs, > + and cannot be used for user-defined tables. The > pg_default tablespace is the default tablespace of the I like the manage-ag.sgml change myself. -- Bruce Momjian https://momjian.us EDB https://enterprisedb.com Only you can decide what is important to you.