File tree 2 files changed +11
-2
lines changed
2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -117,16 +117,25 @@ is_cfm_file_path(const char *filepath) {
117
117
off_t
118
118
get_cfs_relation_file_decompressed_size (RelFileNodeBackend rnode , const char * fullpath , ForkNumber forknum ) {
119
119
File fd ;
120
- int compressor ;
121
120
off_t size ;
122
121
122
+ #if PG_VERSION_NUM >= 120000
123
+ int compressor ;
123
124
compressor = md_get_compressor_internal (nodeOf (rnode ), rnode .backend , forknum );
124
125
fd = PathNameOpenFile (fullpath , O_RDWR | PG_BINARY , compressor );
126
+ #else
127
+ fd = PathNameOpenFile (fullpath , O_RDWR | PG_BINARY | PG_COMPRESSION );
128
+ #endif
125
129
126
130
if (fd < 0 )
127
131
return (off_t )- 1 ;
128
132
133
+ #if PG_VERSION_NUM >= 120000
129
134
size = FileSize (fd );
135
+ #else
136
+ size = FileSeek (fd , 0 , SEEK_END );
137
+ #endif
138
+
130
139
FileClose (fd );
131
140
132
141
return size ;
Original file line number Diff line number Diff line change 45
45
#define PTRACK_MAGIC_SIZE 4
46
46
47
47
/* CFS support macro */
48
- #if defined(PGPRO_EE ) && PG_VERSION_NUM >= 120000
48
+ #if defined(PGPRO_EE ) && PG_VERSION_NUM >= 110000
49
49
#define CFS_SUPPORT 1
50
50
#endif
51
51
You can’t perform that action at this time.
0 commit comments