Commit ec9e05b
committed
Fix crash restart bug introduced in 8356753.
The bug was caused by not re-reading the control file during crash
recovery restarts, which lead to an attempt to pfree() shared memory
contents. The fix is to re-read the control file, which seems good
anyway.
It's unclear as of this moment, whether we want to keep the
refactoring introduced in the commit referenced above, or come up with
an alternative approach. But fixing the bug in the mean time seems
like a good idea regardless.
A followup commit will introduce regression test coverage for crash
restarts.
Reported-By: Tom Lane
Discussion: https://postgr.es/m/14134.1505572349@sss.pgh.pa.us1 parent eb5c404 commit ec9e05b
File tree
4 files changed
+39
-22
lines changed- src
- backend
- access/transam
- postmaster
- tcop
- include/access
4 files changed
+39
-22
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4802 | 4802 | | |
4803 | 4803 | | |
4804 | 4804 | | |
4805 | | - | |
4806 | | - | |
4807 | | - | |
4808 | | - | |
| 4805 | + | |
| 4806 | + | |
| 4807 | + | |
| 4808 | + | |
| 4809 | + | |
| 4810 | + | |
| 4811 | + | |
| 4812 | + | |
4809 | 4813 | | |
4810 | 4814 | | |
4811 | | - | |
| 4815 | + | |
4812 | 4816 | | |
4813 | | - | |
| 4817 | + | |
4814 | 4818 | | |
4815 | 4819 | | |
4816 | 4820 | | |
| |||
4884 | 4888 | | |
4885 | 4889 | | |
4886 | 4890 | | |
4887 | | - | |
4888 | | - | |
4889 | | - | |
4890 | | - | |
| 4891 | + | |
| 4892 | + | |
| 4893 | + | |
| 4894 | + | |
4891 | 4895 | | |
4892 | 4896 | | |
4893 | 4897 | | |
4894 | | - | |
4895 | | - | |
4896 | | - | |
4897 | | - | |
4898 | | - | |
4899 | | - | |
4900 | | - | |
4901 | 4898 | | |
4902 | 4899 | | |
4903 | 4900 | | |
| |||
4908 | 4905 | | |
4909 | 4906 | | |
4910 | 4907 | | |
| 4908 | + | |
| 4909 | + | |
| 4910 | + | |
4911 | 4911 | | |
4912 | 4912 | | |
4913 | 4913 | | |
4914 | 4914 | | |
| 4915 | + | |
| 4916 | + | |
| 4917 | + | |
| 4918 | + | |
| 4919 | + | |
| 4920 | + | |
| 4921 | + | |
| 4922 | + | |
| 4923 | + | |
| 4924 | + | |
4915 | 4925 | | |
4916 | 4926 | | |
4917 | 4927 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
951 | 951 | | |
952 | 952 | | |
953 | 953 | | |
954 | | - | |
| 954 | + | |
955 | 955 | | |
956 | 956 | | |
957 | 957 | | |
| |||
3829 | 3829 | | |
3830 | 3830 | | |
3831 | 3831 | | |
| 3832 | + | |
| 3833 | + | |
| 3834 | + | |
| 3835 | + | |
3832 | 3836 | | |
3833 | 3837 | | |
3834 | 3838 | | |
| |||
4808 | 4812 | | |
4809 | 4813 | | |
4810 | 4814 | | |
4811 | | - | |
4812 | | - | |
| 4815 | + | |
| 4816 | + | |
| 4817 | + | |
| 4818 | + | |
| 4819 | + | |
4813 | 4820 | | |
4814 | 4821 | | |
4815 | 4822 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3718 | 3718 | | |
3719 | 3719 | | |
3720 | 3720 | | |
3721 | | - | |
| 3721 | + | |
3722 | 3722 | | |
3723 | 3723 | | |
3724 | 3724 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
261 | 261 | | |
262 | 262 | | |
263 | 263 | | |
264 | | - | |
| 264 | + | |
265 | 265 | | |
266 | 266 | | |
267 | 267 | | |
| |||
0 commit comments