forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitb76356a
committed
Fix syslogger so that log_truncate_on_rotation works in the first rotation.
In the original coding of the log rotation stuff, we did not bother to makethe truncation logic work for the very first rotation after postmasterstart (or after a syslogger crash and restart). It just always appendedin that case. It did not seem terribly important at the time, but we'verecently had two separate complaints from people who expected it to workunsurprisingly. (Both users tend to restart the postmaster about as oftenas a log rotation is configured to happen, which is maybe not typical use,but still...) Since the initial log file is opened in the postmaster,fixing this requires passing down some more state to the syslogger childprocess.It's always been like this, so back-patch to all supported branches.1 parent2f29f01 commitb76356a
2 files changed
+35
-14
lines changedLines changed: 5 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
441 | 441 |
| |
442 | 442 |
| |
443 | 443 |
| |
| 444 | + | |
444 | 445 |
| |
445 | 446 |
| |
446 | 447 |
| |
| |||
4701 | 4702 |
| |
4702 | 4703 |
| |
4703 | 4704 |
| |
4704 |
| - | |
| 4705 | + | |
4705 | 4706 |
| |
4706 | 4707 |
| |
4707 | 4708 |
| |
4708 | 4709 |
| |
4709 | 4710 |
| |
4710 | 4711 |
| |
4711 | 4712 |
| |
| 4713 | + | |
4712 | 4714 |
| |
4713 | 4715 |
| |
4714 | 4716 |
| |
| |||
4761 | 4763 |
| |
4762 | 4764 |
| |
4763 | 4765 |
| |
| 4766 | + | |
4764 | 4767 |
| |
4765 | 4768 |
| |
4766 | 4769 |
| |
| |||
4985 | 4988 |
| |
4986 | 4989 |
| |
4987 | 4990 |
| |
| 4991 | + | |
4988 | 4992 |
| |
4989 | 4993 |
| |
4990 | 4994 |
| |
|
Lines changed: 30 additions & 13 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2 | 2 |
| |
3 | 3 |
| |
4 | 4 |
| |
5 |
| - | |
| 5 | + | |
6 | 6 |
| |
7 | 7 |
| |
8 | 8 |
| |
| |||
91 | 91 |
| |
92 | 92 |
| |
93 | 93 |
| |
| 94 | + | |
94 | 95 |
| |
95 | 96 |
| |
96 | 97 |
| |
| |||
291 | 292 |
| |
292 | 293 |
| |
293 | 294 |
| |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
294 | 302 |
| |
295 | 303 |
| |
296 | 304 |
| |
| |||
560 | 568 |
| |
561 | 569 |
| |
562 | 570 |
| |
563 |
| - | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
564 | 580 |
| |
565 |
| - | |
| 581 | + | |
| 582 | + | |
566 | 583 |
| |
567 | 584 |
| |
568 | 585 |
| |
| |||
1046 | 1063 |
| |
1047 | 1064 |
| |
1048 | 1065 |
| |
1049 |
| - | |
| 1066 | + | |
1050 | 1067 |
| |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
| 1071 | + | |
1051 | 1072 |
| |
1052 | 1073 |
| |
1053 | 1074 |
| |
| |||
1058 | 1079 |
| |
1059 | 1080 |
| |
1060 | 1081 |
| |
1061 |
| - | |
| 1082 | + | |
| 1083 | + | |
| 1084 | + | |
| 1085 | + | |
1062 | 1086 |
| |
1063 | 1087 |
| |
1064 | 1088 |
| |
| |||
1137 | 1161 |
| |
1138 | 1162 |
| |
1139 | 1163 |
| |
1140 |
| - | |
1141 |
| - | |
1142 |
| - | |
1143 |
| - | |
1144 |
| - | |
1145 |
| - | |
1146 |
| - | |
1147 |
| - | |
| 1164 | + | |
1148 | 1165 |
| |
1149 | 1166 |
| |
1150 | 1167 |
| |
|
0 commit comments
Comments
(0)