mirror of
https://github.com/postgres/postgres.git
synced 2025-07-30 11:03:19 +03:00
Remove spclocation field from pg_tablespace
Instead, add a function pg_tablespace_location(oid) used to return the same information, and do this by reading the symbolic link. Doing it this way makes it possible to relocate a tablespace when the database is down by simply changing the symbolic link.
This commit is contained in:
@ -5391,13 +5391,6 @@
|
||||
<entry>Owner of the tablespace, usually the user who created it</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry><structfield>spclocation</structfield></entry>
|
||||
<entry><type>text</type></entry>
|
||||
<entry></entry>
|
||||
<entry>Location (directory path) of the tablespace</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry><structfield>spcacl</structfield></entry>
|
||||
<entry><type>aclitem[]</type></entry>
|
||||
|
@ -13611,6 +13611,10 @@ SELECT pg_type_is_visible('myschema.widget'::regtype);
|
||||
<primary>pg_tablespace_databases</primary>
|
||||
</indexterm>
|
||||
|
||||
<indexterm>
|
||||
<primary>pg_tablespace_location</primary>
|
||||
</indexterm>
|
||||
|
||||
<indexterm>
|
||||
<primary>pg_typeof</primary>
|
||||
</indexterm>
|
||||
@ -13758,6 +13762,11 @@ SELECT pg_type_is_visible('myschema.widget'::regtype);
|
||||
<entry><type>setof oid</type></entry>
|
||||
<entry>get the set of database OIDs that have objects in the tablespace</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal><function>pg_tablespace_location(<parameter>tablespace_oid</parameter>)</function></literal></entry>
|
||||
<entry><type>text</type></entry>
|
||||
<entry>get the path in the filesystem that this tablespace is located in</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal><function>pg_typeof(<parameter>any</parameter>)</function></literal></entry>
|
||||
<entry><type>regtype</type></entry>
|
||||
|
@ -154,7 +154,7 @@ SELECT attrelid::regclass, array_accum(attname)
|
||||
|
||||
attrelid | array_accum
|
||||
---------------+---------------------------------------
|
||||
pg_tablespace | {spcname,spcowner,spclocation,spcacl}
|
||||
pg_tablespace | {spcname,spcowner,spcacl,spcoptions}
|
||||
(1 row)
|
||||
|
||||
SELECT attrelid::regclass, array_accum(atttypid::regtype)
|
||||
@ -164,7 +164,7 @@ SELECT attrelid::regclass, array_accum(atttypid::regtype)
|
||||
|
||||
attrelid | array_accum
|
||||
---------------+---------------------------
|
||||
pg_tablespace | {name,oid,text,aclitem[]}
|
||||
pg_tablespace | {name,oid,aclitem[],text[]}
|
||||
(1 row)
|
||||
</programlisting>
|
||||
</para>
|
||||
|
Reference in New Issue
Block a user