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

Commitd9378f7

Browse files
committed
CFS GC should ignore directories of other instances
1 parentcad66d9 commitd9378f7

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

‎src/backend/storage/file/cfs.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1361,7 +1361,7 @@ static bool cfs_gc_file(char* map_path, GC_CALL_KIND background)
13611361
* Perform garbage collection on each compressed file
13621362
* in the pg_tblspc directory.
13631363
*/
1364-
staticboolcfs_gc_directory(intworker_id,charconst*path)
1364+
staticboolcfs_gc_directory(intworker_id,charconst*path,intdepth)
13651365
{
13661366
DIR*dir=AllocateDir(path);
13671367
boolsuccess= true;
@@ -1393,7 +1393,7 @@ static bool cfs_gc_directory(int worker_id, char const* path)
13931393
break;
13941394
}
13951395
}
1396-
elseif (!cfs_gc_directory(worker_id,file_path))
1396+
elseif ((depth!=1||strcmp(entry->d_name,TABLESPACE_VERSION_DIRECTORY)==0)&& !cfs_gc_directory(worker_id,file_path,depth+1))
13971397
{
13981398
success= false;
13991399
break;
@@ -1426,7 +1426,7 @@ static void cfs_sighup(SIGNAL_ARGS)
14261426
*/
14271427
staticboolcfs_gc_scan_tablespace(intworker_id)
14281428
{
1429-
returncfs_gc_directory(worker_id,"pg_tblspc");
1429+
returncfs_gc_directory(worker_id,"pg_tblspc",0);
14301430
}
14311431

14321432
staticvoidcfs_gc_bgworker_main(Datumarg)

‎src/include/storage/cfs.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#include"port/atomics.h"
77
#include"storage/rijndael.h"
88

9-
#defineCFS_VERSION "0.47"
9+
#defineCFS_VERSION "0.48"
1010

1111
#defineCFS_GC_LOCK (MAX_BACKENDS+1)
1212

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp