This is an automated email from the ASF dual-hosted git repository.

chenjinbao1989 pushed a commit to branch cbdb-postgres-merge
in repository https://gitbox.apache.org/repos/asf/cloudberry.git


The following commit(s) were added to refs/heads/cbdb-postgres-merge by this 
push:
     new 3cb827078cb Add database id to tablespace path
3cb827078cb is described below

commit 3cb827078cb372e8d79bbc70e086c82c1a3e0985
Author: Jinbao Chen <[email protected]>
AuthorDate: Sat Dec 20 21:05:11 2025 +0800

    Add database id to tablespace path
---
 src/common/relpath.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/common/relpath.c b/src/common/relpath.c
index 3c923969acd..a4d9691e0d4 100644
--- a/src/common/relpath.c
+++ b/src/common/relpath.c
@@ -19,6 +19,7 @@
 #endif
 
 #include "catalog/pg_tablespace_d.h"
+#include "cdb/cdbvars.h"
 #include "common/relpath.h"
 #include "storage/backendid.h"
 
@@ -123,8 +124,8 @@ GetDatabasePath(Oid dbOid, Oid spcOid)
        else
        {
                /* All other tablespaces are accessed via symlinks */
-               return psprintf("pg_tblspc/%u/%s/%u",
-                                               spcOid, 
GP_TABLESPACE_VERSION_DIRECTORY, dbOid);
+               return psprintf("pg_tblspc/%u/%d/%s/%u",
+                                               spcOid, GpIdentity.dbid, 
GP_TABLESPACE_VERSION_DIRECTORY, dbOid);
        }
 }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to