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

Commit163a4c4

Browse files
author
Sokolov Yura
committed
cfs.c: fix stop background worker on restart.
1 parente46d274 commit163a4c4

File tree

1 file changed

+2
-1
lines changed
  • src/backend/storage/file

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1408,6 +1408,7 @@ static bool cfs_gc_directory(int worker_id, char const* path)
14081408
staticvoidcfs_gc_cancel(intsig)
14091409
{
14101410
cfs_gc_stop= true;
1411+
SetLatch(MyLatch);
14111412
}
14121413

14131414
staticvoidcfs_sighup(SIGNAL_ARGS)
@@ -1464,7 +1465,7 @@ static void cfs_gc_bgworker_main(Datum arg)
14641465
rc=WaitLatch(MyLatch,
14651466
WL_LATCH_SET |WL_TIMEOUT |WL_POSTMASTER_DEATH,
14661467
timeout/* ms */ );
1467-
if (rc&WL_POSTMASTER_DEATH)
1468+
if ((rc&WL_POSTMASTER_DEATH)||cfs_gc_stop)
14681469
exit(1);
14691470

14701471
ResetLatch(MyLatch);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp