- Notifications
You must be signed in to change notification settings - Fork4.9k
Commitc61559e
committed
Reduce pg_ctl's reaction time when waiting for postmaster start/stop.
pg_ctl has traditionally waited one second between probes for whetherthe start or stop request has completed. That behavior was embodiedin the original shell script written in 1999 (commit5b912b0) andI doubt anyone's questioned it since. Nowadays, machines are a lotfaster, and the shell script is long since replaced by C code, so it'sfair to reconsider how long we ought to wait.This patch adjusts the coding so that the wait time can be any evendivisor of 1 second, and sets the actual probe rate to 10 per second.That's based on experimentation with the src/test/recovery TAP tests,which include a lot of postmaster starts and stops. This patch alonereduces the (non-parallelized) runtime of those tests from ~4m30s to~3m5s on my machine. Increasing the probe rate further doesn't helpmuch, so this seems like a good number.In the real world this probably won't have much impact, since peopledon't start/stop production postmasters often, and the shutdown checkpointusually takes nontrivial time too. But it makes development work andtesting noticeably snappier, and that's good enough reason for me.Also, by reducing the dead time in postmaster restart sequences, thischange has made it easier to reproduce some bugs that have been lurkingfor awhile. Patches for those will follow.Discussion:https://postgr.es/m/18444.1498428798@sss.pgh.pa.us1 parent5c77690 commitc61559e
1 file changed
+37
-26
lines changedLines changed: 37 additions & 26 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
68 | 68 |
| |
69 | 69 |
| |
70 | 70 |
| |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
71 | 75 |
| |
72 | 76 |
| |
73 | 77 |
| |
| |||
531 | 535 |
| |
532 | 536 |
| |
533 | 537 |
| |
534 |
| - | |
| 538 | + | |
535 | 539 |
| |
536 | 540 |
| |
537 | 541 |
| |
| |||
701 | 705 |
| |
702 | 706 |
| |
703 | 707 |
| |
704 |
| - | |
705 |
| - | |
| 708 | + | |
706 | 709 |
| |
707 |
| - | |
708 |
| - | |
709 |
| - | |
710 |
| - | |
711 |
| - | |
712 |
| - | |
713 |
| - | |
714 |
| - | |
715 |
| - | |
716 |
| - | |
717 |
| - | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
718 | 725 |
| |
719 |
| - | |
| 726 | + | |
| 727 | + | |
720 | 728 |
| |
721 |
| - | |
| 729 | + | |
722 | 730 |
| |
723 | 731 |
| |
724 | 732 |
| |
| |||
998 | 1006 |
| |
999 | 1007 |
| |
1000 | 1008 |
| |
1001 |
| - | |
| 1009 | + | |
1002 | 1010 |
| |
1003 | 1011 |
| |
1004 | 1012 |
| |
1005 |
| - | |
1006 |
| - | |
| 1013 | + | |
| 1014 | + | |
| 1015 | + | |
1007 | 1016 |
| |
1008 | 1017 |
| |
1009 | 1018 |
| |
| |||
1088 | 1097 |
| |
1089 | 1098 |
| |
1090 | 1099 |
| |
1091 |
| - | |
| 1100 | + | |
1092 | 1101 |
| |
1093 | 1102 |
| |
1094 | 1103 |
| |
1095 |
| - | |
1096 |
| - | |
| 1104 | + | |
| 1105 | + | |
| 1106 | + | |
1097 | 1107 |
| |
1098 | 1108 |
| |
1099 | 1109 |
| |
| |||
1225 | 1235 |
| |
1226 | 1236 |
| |
1227 | 1237 |
| |
| 1238 | + | |
1228 | 1239 |
| |
1229 | 1240 |
| |
1230 |
| - | |
| 1241 | + | |
1231 | 1242 |
| |
1232 | 1243 |
| |
1233 | 1244 |
| |
1234 | 1245 |
| |
1235 | 1246 |
| |
1236 |
| - | |
1237 |
| - | |
1238 |
| - | |
| 1247 | + | |
| 1248 | + | |
| 1249 | + | |
1239 | 1250 |
| |
1240 | 1251 |
| |
1241 | 1252 |
| |
|
0 commit comments
Comments
(0)