forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit706f792
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 parent85509b9 commit706f792
2 files changed
+34
-14
lines changedLines changed: 5 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
436 | 436 |
| |
437 | 437 |
| |
438 | 438 |
| |
| 439 | + | |
439 | 440 |
| |
440 | 441 |
| |
441 | 442 |
| |
| |||
4624 | 4625 |
| |
4625 | 4626 |
| |
4626 | 4627 |
| |
4627 |
| - | |
| 4628 | + | |
4628 | 4629 |
| |
4629 | 4630 |
| |
4630 | 4631 |
| |
| |||
4633 | 4634 |
| |
4634 | 4635 |
| |
4635 | 4636 |
| |
| 4637 | + | |
4636 | 4638 |
| |
4637 | 4639 |
| |
4638 | 4640 |
| |
| |||
4684 | 4686 |
| |
4685 | 4687 |
| |
4686 | 4688 |
| |
| 4689 | + | |
4687 | 4690 |
| |
4688 | 4691 |
| |
4689 | 4692 |
| |
| |||
4902 | 4905 |
| |
4903 | 4906 |
| |
4904 | 4907 |
| |
| 4908 | + | |
4905 | 4909 |
| |
4906 | 4910 |
| |
4907 | 4911 |
| |
|
Lines changed: 29 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 |
| |
| |||
90 | 90 |
| |
91 | 91 |
| |
92 | 92 |
| |
| 93 | + | |
93 | 94 |
| |
94 | 95 |
| |
95 | 96 |
| |
| |||
281 | 282 |
| |
282 | 283 |
| |
283 | 284 |
| |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
284 | 292 |
| |
285 | 293 |
| |
286 | 294 |
| |
| |||
532 | 540 |
| |
533 | 541 |
| |
534 | 542 |
| |
535 |
| - | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
536 | 552 |
| |
537 |
| - | |
| 553 | + | |
| 554 | + | |
538 | 555 |
| |
539 | 556 |
| |
540 | 557 |
| |
| |||
1022 | 1039 |
| |
1023 | 1040 |
| |
1024 | 1041 |
| |
1025 |
| - | |
| 1042 | + | |
1026 | 1043 |
| |
| 1044 | + | |
| 1045 | + | |
| 1046 | + | |
| 1047 | + | |
1027 | 1048 |
| |
1028 | 1049 |
| |
1029 | 1050 |
| |
| |||
1049 | 1070 |
| |
1050 | 1071 |
| |
1051 | 1072 |
| |
1052 |
| - | |
| 1073 | + | |
| 1074 | + | |
1053 | 1075 |
| |
| 1076 | + | |
1054 | 1077 |
| |
1055 | 1078 |
| |
1056 | 1079 |
| |
| |||
1085 | 1108 |
| |
1086 | 1109 |
| |
1087 | 1110 |
| |
1088 |
| - | |
1089 |
| - | |
1090 |
| - | |
1091 |
| - | |
1092 |
| - | |
1093 |
| - | |
1094 |
| - | |
1095 |
| - | |
| 1111 | + | |
1096 | 1112 |
| |
1097 | 1113 |
| |
1098 | 1114 |
| |
|
0 commit comments
Comments
(0)