]> granicus.if.org Git - postgresql/commit
Fix crash restart bug introduced in 8356753c212.
authorAndres Freund <andres@anarazel.de>
Sun, 17 Sep 2017 08:00:39 +0000 (01:00 -0700)
committerAndres Freund <andres@anarazel.de>
Tue, 19 Sep 2017 00:25:49 +0000 (17:25 -0700)
commitec9e05b3c392ba9587f283507459737684539574
treec53f046f2bf5ce6403b4d5e43cb38be24a14cfac
parenteb5c404b17752ca566947f12cb702438dcccdcb1
Fix crash restart bug introduced in 8356753c212.

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.us
src/backend/access/transam/xlog.c
src/backend/postmaster/postmaster.c
src/backend/tcop/postgres.c
src/include/access/xlog.h