diff options
author | Andres Freund <andres@anarazel.de> | 2017-09-17 01:00:39 -0700 |
---|---|---|
committer | Andres Freund <andres@anarazel.de> | 2017-09-18 17:25:49 -0700 |
commit | ec9e05b3c392ba9587f283507459737684539574 (patch) | |
tree | c53f046f2bf5ce6403b4d5e43cb38be24a14cfac /src/include/access/xlog.h | |
parent | eb5c404b17752ca566947f12cb702438dcccdcb1 (diff) | |
download | postgresql-ec9e05b3c392ba9587f283507459737684539574.tar.gz postgresql-ec9e05b3c392ba9587f283507459737684539574.zip |
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
Diffstat (limited to 'src/include/access/xlog.h')
-rw-r--r-- | src/include/access/xlog.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/include/access/xlog.h b/src/include/access/xlog.h index e0635ab4e68..7213af0e813 100644 --- a/src/include/access/xlog.h +++ b/src/include/access/xlog.h @@ -261,7 +261,7 @@ extern XLogRecPtr GetFakeLSNForUnloggedRel(void); extern Size XLOGShmemSize(void); extern void XLOGShmemInit(void); extern void BootStrapXLOG(void); -extern void LocalProcessControlFile(void); +extern void LocalProcessControlFile(bool reset); extern void StartupXLOG(void); extern void ShutdownXLOG(int code, Datum arg); extern void InitXLOGAccess(void); |