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

Appearance settings

Commit 5e85315

Browse filesBrowse files
committed
Avoid starting walreceiver in states where it shouldn't be running.
In particular, it's bad to start walreceiver when in state PM_WAIT_BACKENDS, because we have no provision to kill walreceiver when in that state. Fujii Masao
1 parent c5bd8fe commit 5e85315
Copy full SHA for 5e85315

File tree

Expand file treeCollapse file tree

1 file changed

+4
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-2
lines changed

‎src/backend/postmaster/postmaster.c

Copy file name to clipboardExpand all lines: src/backend/postmaster/postmaster.c
+4-2Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
*
3838
*
3939
* IDENTIFICATION
40-
* $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.609 2010/05/26 12:32:41 rhaas Exp $
40+
* $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.610 2010/05/27 02:01:37 rhaas Exp $
4141
*
4242
* NOTES
4343
*
@@ -4217,7 +4217,9 @@ sigusr1_handler(SIGNAL_ARGS)
42174217
}
42184218

42194219
if (CheckPostmasterSignal(PMSIGNAL_START_WALRECEIVER) &&
4220-
WalReceiverPID == 0)
4220+
WalReceiverPID == 0 &&
4221+
(pmState == PM_STARTUP || pmState == PM_RECOVERY ||
4222+
pmState == PM_HOT_STANDBY || pmState == PM_WAIT_READONLY))
42214223
{
42224224
/* Startup Process wants us to start the walreceiver process. */
42234225
WalReceiverPID = StartWalReceiver();

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.