On Wed, Nov  1, 2023 at 06:32:37PM -0400, Tom Lane wrote:
> "David G. Johnston" <david.g.johns...@gmail.com> writes:
> > On Wednesday, November 1, 2023, Bruce Momjian <br...@momjian.us> 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  <br...@momjian.us>        https://momjian.us
  EDB                                      https://enterprisedb.com

  Only you can decide what is important to you.
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;
 
        <para>
         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;
+        <literal>pg_global</literal> cannot be used.
         If the value does not match the name of any existing tablespace,
         <productname>PostgreSQL</productname> 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;
        <para>
         This variable specifies tablespaces in which to create temporary
         objects (temp tables and indexes on temp tables) when a
-        <command>CREATE</command> command does not explicitly specify a tablespace.
+        <command>CREATE</command> command does not explicitly specify a tablespace;
+        <literal>pg_global</literal> cannot be used.
         Temporary files for purposes such as sorting large data sets
         are also created in these tablespaces.
        </para>

Reply via email to