gongxun0928 commented on code in PR #1048:
URL: https://github.com/apache/cloudberry/pull/1048#discussion_r2046247476


##########
contrib/pax_storage/src/cpp/storage/wal/paxc_desc.c:
##########
@@ -38,14 +39,22 @@ void pax_rmgr_desc(StringInfo buf, XLogReaderState *record) 
{
   switch (info) {
     case XLOG_PAX_INSERT: {
       char filename[MAX_PATH_FILE_NAME_LEN];
+      char *relpathPart;
+      size_t relpathPartSz;
 
       char *rec = XLogRecGetData(record);
       xl_pax_insert *xlrec = (xl_pax_insert *)rec;
 
       Assert(xlrec->target.file_name_len < MAX_PATH_FILE_NAME_LEN);
 
-      memcpy(filename, rec + SizeOfPAXInsert, xlrec->target.file_name_len);
-      filename[xlrec->target.file_name_len] = '\0';
+      relpathPart = relpathbackend(xlrec->target.node, InvalidBackendId, 
MAIN_FORKNUM);
+      relpathPartSz = strlen(relpathPart);
+
+      memcpy(filename, relpathPart, relpathPartSz);
+
+      memcpy(filename + relpathPartSz, ".", 1);

Review Comment:
   The data files of the pax table are organized as multiple block files, with 
each block being 64MB in size by default. 
   
   All data files are organized in a directory structure like 
${database_id}/${tblspc_id}/${relfilenode_id}_pax, and the file path would be 
${database_id}/${tblspc_id}/${relfilenode_id}_pax/0.  
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@cloudberry.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cloudberry.apache.org
For additional commands, e-mail: commits-h...@cloudberry.apache.org

Reply via email to