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 1qyK4B-007cop-Md for pgsql-docs@arkaria.postgresql.org; Wed, 01 Nov 2023 22:52:03 +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 1qyK49-009PtG-V5 for pgsql-docs@arkaria.postgresql.org; Wed, 01 Nov 2023 22:52:01 +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 1qyK49-009Pt5-N4 for pgsql-docs@lists.postgresql.org; Wed, 01 Nov 2023 22:52:01 +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 1qyK42-003Vpc-Sw for pgsql-docs@lists.postgresql.org; Wed, 01 Nov 2023 22:52:00 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=momjian.us; s=2023062407; h=In-Reply-To:Content-Transfer-Encoding:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-ID:Content-Description; bh=zAnAR6oKQfa8c7rYneYUoBHslw77p67of0HyMwBDtMU=; b=wXgGoDc7pIdxOyOnEq5+wGRJs6 CVA8vNY+lJAUOKWC5Gv4E2Mzu2xvyMTM5o9e8Iy1gjWH7b6ZYMIZhiNRFQf2xJbf9KlYINRiapg+S 4gY/oV8wn7A3OtNrB4rTnHh9Ag7OSr4X4PBj2N5Kr+QJtTP2PunzCpF510NslwI+eBpY3SA7nZDSy 8/+83B6m7mh+SVQQqim9sE5lWJPsPLUd/xSUDLr2u47/IG3fe/wlprGuB7rSTzb55lKfCeYIibMZ1 LEm98KDLF44q+YxMrCsiIUfNgjQbDfT9KGvOD4G+ILvqDkHlgOeYoSMLXiXJnaBUwkQtj0dqIlF9T /9ZcVMZA==; Received: from bruce by momjian.us with local (Exim 4.96) (envelope-from ) id 1qyK40-009wPJ-35; Wed, 01 Nov 2023 18:51:52 -0400 Date: Wed, 1 Nov 2023 18:51:52 -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> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="iqEZv46OO6ASPZOO" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <2878751.1698877957@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --iqEZv46OO6ASPZOO Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit On Wed, Nov 1, 2023 at 06:32:37PM -0400, Tom Lane wrote: > "David G. Johnston" writes: > > On Wednesday, November 1, 2023, Bruce Momjian wrote: > >> Did you want an error from the SET command? > > > That would probably be a decent addition but the request was for us to add > > “it is not permissible to specify the pg_global tablespace for either > > default_tablespace or temp_tablespace”. In the tablespace section per the > > request but maybe also within the settings definition section. > > 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. -- Bruce Momjian https://momjian.us EDB https://enterprisedb.com Only you can decide what is important to you. --iqEZv46OO6ASPZOO Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="tablespace.diff" diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml index bd70ff2e4b..7179d6273c 100644 --- a/doc/src/sgml/config.sgml +++ b/doc/src/sgml/config.sgml @@ -8706,7 +8706,8 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv; The value is either the name of a tablespace, or an empty string - to specify using the default tablespace of the current database. + to specify using the default tablespace of the current database; + pg_global cannot be used. If the value does not match the name of any existing tablespace, PostgreSQL will automatically use the default tablespace of the current database. If a nondefault tablespace @@ -8774,7 +8775,8 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv; This variable specifies tablespaces in which to create temporary objects (temp tables and indexes on temp tables) when a - CREATE command does not explicitly specify a tablespace. + CREATE command does not explicitly specify a tablespace; + pg_global cannot be used. Temporary files for purposes such as sorting large data sets are also created in these tablespaces. --iqEZv46OO6ASPZOO--