File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Expand file tree Collapse file tree 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) {
117117off_t
118118get_cfs_relation_file_decompressed_size (RelFileNodeBackend rnode , const char * fullpath , ForkNumber forknum ) {
119119 File fd ;
120- int compressor ;
121120 off_t size ;
122121
122+ #if PG_VERSION_NUM >= 120000
123+ int compressor ;
123124 compressor = md_get_compressor_internal (nodeOf (rnode ), rnode .backend , forknum );
124125 fd = PathNameOpenFile (fullpath , O_RDWR | PG_BINARY , compressor );
126+ #else
127+ fd = PathNameOpenFile (fullpath , O_RDWR | PG_BINARY | PG_COMPRESSION );
128+ #endif
125129
126130 if (fd < 0 )
127131 return (off_t )- 1 ;
128132
133+ #if PG_VERSION_NUM >= 120000
129134 size = FileSize (fd );
135+ #else
136+ size = FileSeek (fd , 0 , SEEK_END );
137+ #endif
138+
130139 FileClose (fd );
131140
132141 return size ;
Original file line number Diff line number Diff line change 4545#define PTRACK_MAGIC_SIZE 4
4646
4747/* CFS support macro */
48- #if defined(PGPRO_EE ) && PG_VERSION_NUM >= 120000
48+ #if defined(PGPRO_EE ) && PG_VERSION_NUM >= 110000
4949#define CFS_SUPPORT 1
5050#endif
5151
You can’t perform that action at this time.
0 commit comments