File tree Expand file tree Collapse file tree
contrib/pax_storage/src/cpp/storage/wal Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3030#else
3131#include "storage/wal/paxc_desc.h"
3232#endif
33+ #include "common/relpath.h"
3334
3435void pax_rmgr_desc (StringInfo buf , XLogReaderState * record ) {
3536 char * rec = XLogRecGetData (record );
@@ -38,14 +39,22 @@ void pax_rmgr_desc(StringInfo buf, XLogReaderState *record) {
3839 switch (info ) {
3940 case XLOG_PAX_INSERT : {
4041 char filename [MAX_PATH_FILE_NAME_LEN ];
42+ char * relpathPart ;
43+ size_t relpathPartSz ;
4144
4245 char * rec = XLogRecGetData (record );
4346 xl_pax_insert * xlrec = (xl_pax_insert * )rec ;
4447
4548 Assert (xlrec -> target .file_name_len < MAX_PATH_FILE_NAME_LEN );
4649
47- memcpy (filename , rec + SizeOfPAXInsert , xlrec -> target .file_name_len );
48- filename [xlrec -> target .file_name_len ] = '\0' ;
50+ relpathPart = relpathbackend (xlrec -> target .node , InvalidBackendId , MAIN_FORKNUM );
51+ relpathPartSz = strlen (relpathPart );
52+
53+ memcpy (filename , relpathPart , relpathPartSz );
54+
55+ memcpy (filename + relpathPartSz , "." , 1 );
56+ memcpy (filename + relpathPartSz + 1 , rec + SizeOfPAXInsert , xlrec -> target .file_name_len );
57+ filename [relpathPartSz + xlrec -> target .file_name_len + 1 ] = '\0' ;
4958
5059 int32 bufferLen = XLogRecGetDataLen (record ) - SizeOfPAXInsert -
5160 xlrec -> target .file_name_len ;
You can’t perform that action at this time.
0 commit comments