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 1t0UNd-00Bhf4-Na for pgsql-docs@arkaria.postgresql.org; Mon, 14 Oct 2024 23:21:37 +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 1t0UNb-000prV-F1 for pgsql-docs@arkaria.postgresql.org; Mon, 14 Oct 2024 23:21:35 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t0UNb-000prN-79 for pgsql-docs@lists.postgresql.org; Mon, 14 Oct 2024 23:21:35 +0000 Received: from momjian.us ([72.94.173.45]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t0UNX-0015Ki-Um for pgsql-docs@lists.postgresql.org; Mon, 14 Oct 2024 23:21:34 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=momjian.us; s=2024011501; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:To:From:Date:Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID: Content-Description; bh=yqwJ5Nff1Kv5me313t5/h3xLmX8ikzpV7Ffiuo74BLQ=; b=G+JhK vrpenZZ/ZX0WoFRUG9+i+xd9sbPe6A7DQv1GngC2tXJiHz06qkU6iapDv5OIFJTfKQjh/o7XOJZt6 sjc9yU1e64UHejUfz+0mO0c7hlMpx5MPpJEA0oByd8H2x4a0NDrE9ndU/8Yd8B0ntOvItFwjYwFUB lxejboeKSNuS0Zij6j5cMaU9o1cjUeG+M0lChSMRV3wLxNBVS2g67eQrr+OH21dwReuEUSwXFtOfb zgm7Q6YiT2KeOkgC4KfSZaM9XHhGsKKWcNnnbMOeGJnopipoK5aWzeZZw6MUwWTjALNt+6Esdjjw+ AwwKcWkHkfbOsk+8vxggmO57b7DCQ==; Received: from bruce by momjian.us with local (Exim 4.96) (envelope-from ) id 1t0UNY-001gb9-0D for pgsql-docs@lists.postgresql.org; Mon, 14 Oct 2024 19:21:32 -0400 Date: Mon, 14 Oct 2024 19:21:32 -0400 From: Bruce Momjian To: pgsql-docs@lists.postgresql.org Subject: Re: Add mention to related system catalog functions on Tablespaces documentation pages. Message-ID: References: <172609721070.1128084.6724666076293146476@wrigleys.postgresql.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="PbWNuJThbnTvpzlG" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --PbWNuJThbnTvpzlG Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Oct 14, 2024 at 07:15:50PM -0400, Bruce Momjian wrote: > On Wed, Sep 11, 2024 at 11:26:50PM +0000, PG Doc comments form wrote: > > The following documentation comment has been logged on the website: > > > > Page: https://www.postgresql.org/docs/16/manage-ag-tablespaces.html > > Description: > > > > The tablespaces documentation page seems to be missing a mention to the > > following functions: > > pg_tablespace_databases > > pg_tablespace_location > > > > These are documented in > > https://www.postgresql.org/docs/current/functions-info.html#FUNCTIONS-INFO-CATALOG, > > but I think it would be nice to add at least a brief mention (or link) to > > them in the main tablespace docs. The following query is especially helpful > > when troubleshooting issues with tablespaces: > > > > postgres=# SELECT *, pg_tablespace_location(oid) FROM pg_tablespace; > > > > It would be beneficial, in my opinion, to use it as an additional example to > > the one that is currently shown. > > Yes, very good points. I have developed the attached patch which I > think achieves the goals you mentioned. I plan to apply the patch for > master/PG 18. > > I also removed the unnecessary mention of PG 9.1. > > Seems the reply email address is g***@gmail.com, which seems like some > kind of mistake. Sorry, patch attached. Invalid email address removed. -- Bruce Momjian https://momjian.us EDB https://enterprisedb.com When a patient asks the doctor, "Am I going to die?", he means "Am I going to die soon?" --PbWNuJThbnTvpzlG Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="tablespace.diff" diff --git a/doc/src/sgml/manage-ag.sgml b/doc/src/sgml/manage-ag.sgml index a8a70a1fc42..fe4cb4410cd 100644 --- a/doc/src/sgml/manage-ag.sgml +++ b/doc/src/sgml/manage-ag.sgml @@ -530,9 +530,11 @@ CREATE TABLE foo(i int); pg_tablespace system catalog, for example -SELECT spcname FROM pg_tablespace; +SELECT spcname, spcowner::regrole, pg_tablespace_location(oid) FROM pg_tablespace; - The program's \db meta-command + It is possible to find which databases use which tablespaces; + see . The program's \db meta-command is also useful for listing the existing tablespaces. @@ -541,10 +543,7 @@ SELECT spcname FROM pg_tablespace; point to each of the non-built-in tablespaces defined in the cluster. Although not recommended, it is possible to adjust the tablespace layout by hand by redefining these links. Under no circumstances perform - this operation while the server is running. Note that in PostgreSQL 9.1 - and earlier you will also need to update the pg_tablespace - catalog with the new locations. (If you do not, pg_dump will - continue to output the old tablespace locations.) + this operation while the server is running. --PbWNuJThbnTvpzlG--