Re: [PATCH] Add pg_get_tablespace_ddl() function to reconstruct CREATE TABLESPACE statement
Álvaro Herrera <alvherre@kurilemu.de>
From: Álvaro Herrera <alvherre@kurilemu.de>
To: Manni Wood <manni.wood@enterprisedb.com>
Cc: Nishant Sharma <nishant.sharma@enterprisedb.com>, Jim Jones <jim.jones@uni-muenster.de>, pgsql-hackers@postgresql.org
Date: 2025-11-12T16:15:46Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Add infrastructure for pg_get_*_ddl functions
- 4881981f9202 19 (unreleased) landed
-
Add pg_get_tablespace_ddl() function
- b99fd9fd7f36 19 (unreleased) landed
-
Split out innards of pg_tablespace_location()
- 877a024902a7 19 (unreleased) landed
-
Remove spclocation field from pg_tablespace
- 16d8e594acd9 9.2.0 cited
Attachments
- v12-0002-Adds-pg_get_tablespace_ddl-function.patch (text/x-diff)
On 2025-Nov-12, Manni Wood wrote: > Thanks, Álvaro, for your continued help with this. > > I have attached v11 patches that use all of the fixes from your > review.patch.txt. OK, thanks, I pushed 0001 now. I think you could claim that some routines currently in src/backend/commands/tablespace.c logically belong in the new file, but unless you want to take on the task of moving a lot of other routines under commands/ to their respective catalog/ file, then I think it's more or less fine as is. To be clear, I do not intend to do anything with your 0002 patch [for now]. I'm going to let Andrew take these DDL-producing functions in his hands. Here I'm just posting your 0002 again, to make the cfbot happy. Thanks -- Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/ "Nunca se desea ardientemente lo que solo se desea por razón" (F. Alexandre)