@@ -109,7 +109,7 @@ is_cfm_file_path(const char *filepath) {
109
109
return strlen (filepath ) >= 5 && strcmp (& filepath [len - 4 ], ".cfm" ) == 0 ;
110
110
}
111
111
112
- #ifdef PGPRO_EE
112
+ #if CFS_SUPPORT
113
113
/*
114
114
* Determines the relation file size specified by fullpath as if it
115
115
* was not compressed.
@@ -120,7 +120,7 @@ get_cfs_relation_file_decompressed_size(RelFileNodeBackend rnode, const char *fu
120
120
int compressor ;
121
121
off_t size ;
122
122
123
- compressor = md_get_compressor_internal (rnode . node , rnode .backend , forknum );
123
+ compressor = md_get_compressor_internal (nodeOf ( rnode ) , rnode .backend , forknum );
124
124
fd = PathNameOpenFile (fullpath , O_RDWR | PG_BINARY , compressor );
125
125
126
126
if (fd < 0 )
@@ -540,7 +540,7 @@ assign_ptrack_map_size(int newval, void *extra)
540
540
* For use in functions that copy directories bypassing buffer manager.
541
541
*/
542
542
static void
543
- #ifdef PGPRO_EE
543
+ #if CFS_SUPPORT
544
544
ptrack_mark_file (Oid dbOid , Oid tablespaceOid ,
545
545
const char * filepath , const char * filename , bool is_cfs )
546
546
#else
@@ -555,7 +555,7 @@ ptrack_mark_file(Oid dbOid, Oid tablespaceOid,
555
555
struct stat stat_buf ;
556
556
int oidchars ;
557
557
char oidbuf [OIDCHARS + 1 ];
558
- #ifdef PGPRO_EE
558
+ #if CFS_SUPPORT
559
559
off_t rel_size ;
560
560
#endif
561
561
@@ -576,11 +576,11 @@ ptrack_mark_file(Oid dbOid, Oid tablespaceOid,
576
576
oidbuf [oidchars ] = '\0' ;
577
577
nodeRel (nodeOf (rnode )) = atooid (oidbuf );
578
578
579
- #ifdef PGPRO_EE
579
+ #if CFS_SUPPORT
580
580
// if current tablespace is cfs-compressed and md_get_compressor_internal
581
581
// returns the type of the compressing algorithm for filepath, then it
582
582
// needs to be de-compressed to obtain its size
583
- if (is_cfs && md_get_compressor_internal (rnode . node , rnode .backend , forknum ) != 0 ) {
583
+ if (is_cfs && md_get_compressor_internal (nodeOf ( rnode ) , rnode .backend , forknum ) != 0 ) {
584
584
rel_size = get_cfs_relation_file_decompressed_size (rnode , filepath , forknum );
585
585
586
586
if (rel_size == (off_t )- 1 ) {
@@ -611,7 +611,7 @@ ptrack_walkdir(const char *path, Oid tablespaceOid, Oid dbOid)
611
611
{
612
612
DIR * dir ;
613
613
struct dirent * de ;
614
- #ifdef PGPRO_EE
614
+ #if CFS_SUPPORT
615
615
bool is_cfs ;
616
616
#endif
617
617
@@ -622,7 +622,7 @@ ptrack_walkdir(const char *path, Oid tablespaceOid, Oid dbOid)
622
622
|| InitializingParallelWorker )
623
623
return ;
624
624
625
- #ifdef PGPRO_EE
625
+ #if CFS_SUPPORT
626
626
is_cfs = file_is_in_cfs_tablespace (path );
627
627
#endif
628
628
@@ -653,7 +653,7 @@ ptrack_walkdir(const char *path, Oid tablespaceOid, Oid dbOid)
653
653
}
654
654
655
655
if (S_ISREG (fst .st_mode ))
656
- #ifdef PGPRO_EE
656
+ #if CFS_SUPPORT
657
657
ptrack_mark_file (dbOid , tablespaceOid , subpath , de -> d_name , is_cfs );
658
658
#else
659
659
ptrack_mark_file (dbOid , tablespaceOid , subpath , de -> d_name );
0 commit comments