1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-21 16:02:15 +03:00

doc: improve tablespace example query and link to helper funcs.

Reported-by: Agustín

Discussion: https://postgr.es/m/172609721070.1128084.6724666076293146476@wrigleys.postgresql.org

Backpatch-through: master
This commit is contained in:
Bruce Momjian
2024-11-01 15:54:16 -04:00
parent 4200fea80e
commit e1a76db1a8

View File

@ -530,9 +530,11 @@ CREATE TABLE foo(i int);
<link linkend="catalog-pg-tablespace"><structname>pg_tablespace</structname> <link linkend="catalog-pg-tablespace"><structname>pg_tablespace</structname>
</link> system catalog, for example </link> system catalog, for example
<synopsis> <synopsis>
SELECT spcname FROM pg_tablespace; SELECT spcname, spcowner::regrole, pg_tablespace_location(oid) FROM pg_tablespace;
</synopsis> </synopsis>
The <xref linkend="app-psql"/> program's <literal>\db</literal> meta-command It is possible to find which databases use which tablespaces;
see <xref linkend="functions-info-catalog-table"/>. The <xref
linkend="app-psql"/> program's <literal>\db</literal> meta-command
is also useful for listing the existing tablespaces. is also useful for listing the existing tablespaces.
</para> </para>
@ -541,10 +543,7 @@ SELECT spcname FROM pg_tablespace;
point to each of the non-built-in tablespaces defined in the cluster. point to each of the non-built-in tablespaces defined in the cluster.
Although not recommended, it is possible to adjust the tablespace Although not recommended, it is possible to adjust the tablespace
layout by hand by redefining these links. Under no circumstances perform layout by hand by redefining these links. Under no circumstances perform
this operation while the server is running. Note that in PostgreSQL 9.1 this operation while the server is running.
and earlier you will also need to update the <structname>pg_tablespace</structname>
catalog with the new locations. (If you do not, <literal>pg_dump</literal> will
continue to output the old tablespace locations.)
</para> </para>
</sect1> </sect1>