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

Commitfc8b39a

Browse files
committed
Don't auto-restart per-database autoprewarm workers.
We should try to prewarm each database only once. Otherwise, ifprewarming fails for some reason, it will just keep retrying in aninfnite loop. This can happen if, for example, the database has beendropped. The existing code was intended to implement the try-oncebehavior, but failed to do so because it neglected to setworker.bgw_restart_time to BGW_NEVER_RESTART.Mithun Cy, per a report from Hans BuschmannDiscussion:http://postgr.es/m/CA+hUKGKpQJCWcgyy3QTC9vdn6uKAR_8r__A-MMm2GYfj45caag@mail.gmail.com
1 parentdcf2a0d commitfc8b39a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

‎contrib/pg_prewarm/autoprewarm.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -844,6 +844,7 @@ apw_start_database_worker(void)
844844
worker.bgw_flags=
845845
BGWORKER_SHMEM_ACCESS |BGWORKER_BACKEND_DATABASE_CONNECTION;
846846
worker.bgw_start_time=BgWorkerStart_ConsistentState;
847+
worker.bgw_restart_time=BGW_NEVER_RESTART;
847848
strcpy(worker.bgw_library_name,"pg_prewarm");
848849
strcpy(worker.bgw_function_name,"autoprewarm_database_main");
849850
strcpy(worker.bgw_name,"autoprewarm worker");

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp