agora inbox for pgsql-docs@postgresql.org  
help / color / mirror / Atom feed
Add mention to related system catalog functions on Tablespaces documentation pages.
4+ messages / 2 participants
[nested] [flat]

* Add mention to related system catalog functions on Tablespaces documentation pages.
@ 2024-09-11 23:26  PG Doc comments form <noreply@postgresql.org>
  0 siblings, 1 reply; 4+ messages in thread

From: PG Doc comments form @ 2024-09-11 23:26 UTC (permalink / raw)
  To: pgsql-docs@lists.postgresql.org; +Cc: g***@gmail.com

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.

Best,
Agustín.


^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Add mention to related system catalog functions on Tablespaces documentation pages.
@ 2024-10-14 23:15  Bruce Momjian <bruce@momjian.us>
  parent: PG Doc comments form <noreply@postgresql.org>
  0 siblings, 1 reply; 4+ messages in thread

From: Bruce Momjian @ 2024-10-14 23:15 UTC (permalink / raw)
  To: g***@gmail.com; pgsql-docs@lists.postgresql.org

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.

-- 
  Bruce Momjian  <bruce@momjian.us>        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?"





^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Add mention to related system catalog functions on Tablespaces documentation pages.
@ 2024-10-14 23:21  Bruce Momjian <bruce@momjian.us>
  parent: Bruce Momjian <bruce@momjian.us>
  0 siblings, 1 reply; 4+ messages in thread

From: Bruce Momjian @ 2024-10-14 23:21 UTC (permalink / raw)
  To: pgsql-docs@lists.postgresql.org

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  <bruce@momjian.us>        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?"

Attachments:

  [text/x-diff] tablespace.diff (1.5K, ../../Zw2nfPG4ikW-MFDf@momjian.us/2-tablespace.diff)
  download | inline 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);
    <link linkend="catalog-pg-tablespace"><structname>pg_tablespace</structname>
    </link> system catalog, for example
 <synopsis>
-SELECT spcname FROM pg_tablespace;
+SELECT spcname, spcowner::regrole, pg_tablespace_location(oid) FROM pg_tablespace;
 </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.
   </para>
 
@@ -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 <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.)
+   this operation while the server is running.
   </para>
 
  </sect1>

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Add mention to related system catalog functions on Tablespaces documentation pages.
@ 2024-11-01 19:54  Bruce Momjian <bruce@momjian.us>
  parent: Bruce Momjian <bruce@momjian.us>
  0 siblings, 0 replies; 4+ messages in thread

From: Bruce Momjian @ 2024-11-01 19:54 UTC (permalink / raw)
  To: pgsql-docs@lists.postgresql.org

On Mon, Oct 14, 2024 at 07:21:32PM -0400, Bruce Momjian wrote:
> 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:
> > 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.

Patch applied to master.

-- 
  Bruce Momjian  <bruce@momjian.us>        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?"





^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2024-11-01 19:54 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-09-11 23:26 Add mention to related system catalog functions on Tablespaces documentation pages. PG Doc comments form <noreply@postgresql.org>
2024-10-14 23:15 ` Bruce Momjian <bruce@momjian.us>
2024-10-14 23:21   ` Bruce Momjian <bruce@momjian.us>
2024-11-01 19:54     ` Bruce Momjian <bruce@momjian.us>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox