forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitec1259e
committed
Fix failure of archive recovery with recovery_min_apply_delay enabled.
recovery_min_apply_delay parameter is intended for use with streamingreplication deployments. However, the document clearly explains thatthe parameter will be honored in all cases if it's specified. So it shouldtake effect even if in archive recovery. But, previously, archive recoverywith recovery_min_apply_delay enabled always failed, and caused assertionfailure if --enable-caasert is enabled.The cause of this problem is that; the ownership of recoveryWakeupLatchthat recovery_min_apply_delay uses was taken only when standby modeis requested. So unowned latch could be used in archive recovery, andwhich caused the failure.This commit changes recovery code so that the ownership ofrecoveryWakeupLatch is taken even in archive recovery. Which preventsarchive recovery with recovery_min_apply_delay from failing.Back-patch to v9.4 where recovery_min_apply_delay was added.Author: Fujii MasaoReviewed-by: Michael PaquierDiscussion:https://postgr.es/m/CAHGQGwEyD6HdZLfdWc+95g=VQFPR4zQL4n+yHxQgGEGjaSVheQ@mail.gmail.com1 parent9b95a36 commitec1259e
1 file changed
+14
-2
lines changedLines changed: 14 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
6354 | 6354 |
| |
6355 | 6355 |
| |
6356 | 6356 |
| |
6357 |
| - | |
| 6357 | + | |
6358 | 6358 |
| |
6359 | 6359 |
| |
6360 | 6360 |
| |
| |||
7338 | 7338 |
| |
7339 | 7339 |
| |
7340 | 7340 |
| |
7341 |
| - | |
| 7341 | + | |
7342 | 7342 |
| |
7343 | 7343 |
| |
7344 | 7344 |
| |
| |||
11873 | 11873 |
| |
11874 | 11874 |
| |
11875 | 11875 |
| |
| 11876 | + | |
| 11877 | + | |
| 11878 | + | |
| 11879 | + | |
| 11880 | + | |
| 11881 | + | |
11876 | 11882 |
| |
11877 | 11883 |
| |
11878 | 11884 |
| |
| |||
11986 | 11992 |
| |
11987 | 11993 |
| |
11988 | 11994 |
| |
| 11995 | + | |
| 11996 | + | |
| 11997 | + | |
| 11998 | + | |
| 11999 | + | |
| 12000 | + | |
11989 | 12001 |
| |
11990 | 12002 |
| |
11991 | 12003 |
| |
|
0 commit comments
Comments
(0)