Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita0ddcbe

Browse files
author
Daniel Shelepanov
committed
[PBCKP-278] md_get_compressor_internal is now used to determine whether the file is compressed
This will help if and when fsm and vm files will be comressable.
1 parentc0ee9af commita0ddcbe

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

‎engine.c‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,6 @@ ptrack_mark_file(Oid dbOid, Oid tablespaceOid,
579579
intoidchars;
580580
charoidbuf[OIDCHARS+1];
581581
#ifdefPGPRO_EE
582-
FileTypefile_type;
583582
off_trel_size;
584583
#endif
585584

@@ -601,10 +600,10 @@ ptrack_mark_file(Oid dbOid, Oid tablespaceOid,
601600
nodeRel(nodeOf(rnode))=atooid(oidbuf);
602601

603602
#ifdefPGPRO_EE
604-
file_type=file_type_from_path(filepath);
605-
606-
if(is_cfs&& (file_type==FileTypeMain
607-
||file_type==FileTypeMainMulti)) {
603+
// if current tablespace is cfs-compressed and md_get_compressor_internal
604+
// returns the type of the compressing algorithm for filepath, then it
605+
// needs to be de-compressed to obtain its size
606+
if(is_cfs&&md_get_compressor_internal(rnode.node,rnode.backend,forknum)!=0) {
608607
rel_size=get_cfs_relation_file_decompressed_size(rnode,filepath,forknum);
609608

610609
if(rel_size== (off_t)-1) {

‎ptrack.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,8 @@ ptrack_gather_filelist(List **filelist, char *path, Oid spcOid, Oid dbOid)
353353
pfl->segno=0;
354354

355355
#ifdefPGPRO_EE
356-
pfl->is_cfs_compressed=is_cfs&&pfl->forknum==MAIN_FORKNUM;
356+
pfl->is_cfs_compressed=is_cfs
357+
&&md_get_compressor_internal(pfl->relnode,InvalidBackendId,pfl->forknum)!=0;
357358
#endif
358359
memcpy(oidbuf,de->d_name,oidchars);
359360
oidbuf[oidchars]='\0';

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp