Commit c6c9474
committed
Use condition variables to wait for checkpoints.
Previously we used a polling/sleeping loop to wait for checkpoints
to begin and end, which leads to up to a couple hundred milliseconds
of needless thumb-twiddling. Use condition variables instead.
Author: Thomas Munro
Reviewed-by: Andres Freund
Discussion: https://postgr.es/m/CA%2BhUKGLY7sDe%2Bbg1K%3DbnEzOofGoo4bJHYh9%2BcDCXJepb6DQmLw%40mail.gmail.com1 parent 5655565 commit c6c9474
File tree
4 files changed
+34
-5
lines changed- doc/src/sgml
- src
- backend/postmaster
- include
4 files changed
+34
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1281 | 1281 | | |
1282 | 1282 | | |
1283 | 1283 | | |
1284 | | - | |
| 1284 | + | |
1285 | 1285 | | |
1286 | 1286 | | |
1287 | 1287 | | |
| |||
1293 | 1293 | | |
1294 | 1294 | | |
1295 | 1295 | | |
| 1296 | + | |
| 1297 | + | |
| 1298 | + | |
| 1299 | + | |
| 1300 | + | |
| 1301 | + | |
| 1302 | + | |
| 1303 | + | |
1296 | 1304 | | |
1297 | 1305 | | |
1298 | 1306 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
129 | 132 | | |
130 | 133 | | |
131 | 134 | | |
| |||
428 | 431 | | |
429 | 432 | | |
430 | 433 | | |
| 434 | + | |
| 435 | + | |
431 | 436 | | |
432 | 437 | | |
433 | 438 | | |
| |||
488 | 493 | | |
489 | 494 | | |
490 | 495 | | |
| 496 | + | |
| 497 | + | |
491 | 498 | | |
492 | 499 | | |
493 | 500 | | |
| |||
915 | 922 | | |
916 | 923 | | |
917 | 924 | | |
| 925 | + | |
| 926 | + | |
918 | 927 | | |
919 | 928 | | |
920 | 929 | | |
| |||
1023 | 1032 | | |
1024 | 1033 | | |
1025 | 1034 | | |
| 1035 | + | |
1026 | 1036 | | |
1027 | 1037 | | |
1028 | 1038 | | |
| |||
1032 | 1042 | | |
1033 | 1043 | | |
1034 | 1044 | | |
1035 | | - | |
1036 | | - | |
| 1045 | + | |
| 1046 | + | |
1037 | 1047 | | |
| 1048 | + | |
1038 | 1049 | | |
1039 | 1050 | | |
1040 | 1051 | | |
1041 | 1052 | | |
| 1053 | + | |
1042 | 1054 | | |
1043 | 1055 | | |
1044 | 1056 | | |
| |||
1051 | 1063 | | |
1052 | 1064 | | |
1053 | 1065 | | |
1054 | | - | |
1055 | | - | |
| 1066 | + | |
| 1067 | + | |
1056 | 1068 | | |
| 1069 | + | |
1057 | 1070 | | |
1058 | 1071 | | |
1059 | 1072 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3623 | 3623 | | |
3624 | 3624 | | |
3625 | 3625 | | |
| 3626 | + | |
| 3627 | + | |
| 3628 | + | |
| 3629 | + | |
| 3630 | + | |
| 3631 | + | |
3626 | 3632 | | |
3627 | 3633 | | |
3628 | 3634 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
817 | 817 | | |
818 | 818 | | |
819 | 819 | | |
| 820 | + | |
| 821 | + | |
820 | 822 | | |
821 | 823 | | |
822 | 824 | | |
| |||
0 commit comments