forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitc8e8b5a
committed
Try to log current the query string when a backend crashes.
To avoid minimize risk inside the postmaster, we subject this featureto a number of significant limitations. We very much wish to avoiddoing any complex processing inside the postmaster, due to theposssibility that the crashed backend has completely corrupted sharedmemory. To that end, no encoding conversion is done; instead, we justreplace anything that doesn't look like an ASCII character with aquestion mark. We limit the amount of data copied to 1024 characters,and carefully sanity check the source of that data. While theserestrictions would doubtless be unacceptable in a general-purposelogging facility, even this limited facility seems like an improvementover the status quo ante.Marti Raudsepp, reviewed by PDXPUG and myself1 parent9802619 commitc8e8b5a
File tree
5 files changed
+125
-7
lines changed- src
- backend
- postmaster
- utils/adt
- include
- utils
5 files changed
+125
-7
lines changedLines changed: 71 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
58 | 58 |
| |
59 | 59 |
| |
60 | 60 |
| |
| 61 | + | |
61 | 62 |
| |
62 | 63 |
| |
63 | 64 |
| |
| |||
2228 | 2229 |
| |
2229 | 2230 |
| |
2230 | 2231 |
| |
| 2232 | + | |
2231 | 2233 |
| |
2232 | 2234 |
| |
2233 | 2235 |
| |
| |||
2310 | 2312 |
| |
2311 | 2313 |
| |
2312 | 2314 |
| |
2313 |
| - | |
| 2315 | + | |
| 2316 | + | |
2314 | 2317 |
| |
2315 |
| - | |
| 2318 | + | |
| 2319 | + | |
| 2320 | + | |
2316 | 2321 |
| |
2317 | 2322 |
| |
2318 | 2323 |
| |
| |||
2751 | 2756 |
| |
2752 | 2757 |
| |
2753 | 2758 |
| |
| 2759 | + | |
| 2760 | + | |
| 2761 | + | |
| 2762 | + | |
| 2763 | + | |
| 2764 | + | |
| 2765 | + | |
| 2766 | + | |
| 2767 | + | |
| 2768 | + | |
| 2769 | + | |
| 2770 | + | |
| 2771 | + | |
| 2772 | + | |
| 2773 | + | |
| 2774 | + | |
| 2775 | + | |
| 2776 | + | |
| 2777 | + | |
| 2778 | + | |
| 2779 | + | |
| 2780 | + | |
| 2781 | + | |
| 2782 | + | |
| 2783 | + | |
| 2784 | + | |
| 2785 | + | |
| 2786 | + | |
| 2787 | + | |
| 2788 | + | |
| 2789 | + | |
| 2790 | + | |
| 2791 | + | |
| 2792 | + | |
| 2793 | + | |
| 2794 | + | |
| 2795 | + | |
| 2796 | + | |
| 2797 | + | |
| 2798 | + | |
| 2799 | + | |
| 2800 | + | |
| 2801 | + | |
| 2802 | + | |
| 2803 | + | |
| 2804 | + | |
| 2805 | + | |
| 2806 | + | |
| 2807 | + | |
| 2808 | + | |
| 2809 | + | |
| 2810 | + | |
| 2811 | + | |
| 2812 | + | |
| 2813 | + | |
| 2814 | + | |
| 2815 | + | |
| 2816 | + | |
| 2817 | + | |
| 2818 | + | |
| 2819 | + | |
| 2820 | + | |
| 2821 | + | |
| 2822 | + | |
2754 | 2823 |
| |
2755 | 2824 |
| |
2756 | 2825 |
| |
|
Lines changed: 17 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2777 | 2777 |
| |
2778 | 2778 |
| |
2779 | 2779 |
| |
| 2780 | + | |
| 2781 | + | |
| 2782 | + | |
| 2783 | + | |
| 2784 | + | |
| 2785 | + | |
| 2786 | + | |
2780 | 2787 |
| |
2781 | 2788 |
| |
2782 | 2789 |
| |
2783 | 2790 |
| |
2784 | 2791 |
| |
2785 | 2792 |
| |
2786 | 2793 |
| |
2787 |
| - | |
| 2794 | + | |
| 2795 | + | |
2788 | 2796 |
| |
2789 | 2797 |
| |
2790 | 2798 |
| |
| |||
2794 | 2802 |
| |
2795 | 2803 |
| |
2796 | 2804 |
| |
2797 |
| - | |
| 2805 | + | |
| 2806 | + | |
2798 | 2807 |
| |
2799 | 2808 |
| |
2800 | 2809 |
| |
| |||
2804 | 2813 |
| |
2805 | 2814 |
| |
2806 | 2815 |
| |
2807 |
| - | |
| 2816 | + | |
| 2817 | + | |
2808 | 2818 |
| |
2809 | 2819 |
| |
2810 | 2820 |
| |
2811 | 2821 |
| |
2812 | 2822 |
| |
2813 | 2823 |
| |
2814 | 2824 |
| |
2815 |
| - | |
| 2825 | + | |
| 2826 | + | |
2816 | 2827 |
| |
2817 | 2828 |
| |
2818 | 2829 |
| |
| |||
2821 | 2832 |
| |
2822 | 2833 |
| |
2823 | 2834 |
| |
2824 |
| - | |
| 2835 | + | |
| 2836 | + | |
2825 | 2837 |
| |
2826 | 2838 |
| |
2827 | 2839 |
| |
|
Lines changed: 34 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
158 | 158 |
| |
159 | 159 |
| |
160 | 160 |
| |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + |
Lines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
720 | 720 |
| |
721 | 721 |
| |
722 | 722 |
| |
| 723 | + | |
| 724 | + | |
723 | 725 |
| |
724 | 726 |
| |
725 | 727 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
16 | 16 |
| |
17 | 17 |
| |
18 | 18 |
| |
| 19 | + | |
19 | 20 |
| |
20 | 21 |
|
0 commit comments
Comments
(0)