aboutsummaryrefslogtreecommitdiff
path: root/src/backend/tcop/postgres.c
diff options
context:
space:
mode:
authorAndres Freund <andres@anarazel.de>2017-09-17 01:00:39 -0700
committerAndres Freund <andres@anarazel.de>2017-09-18 17:25:49 -0700
commitec9e05b3c392ba9587f283507459737684539574 (patch)
treec53f046f2bf5ce6403b4d5e43cb38be24a14cfac /src/backend/tcop/postgres.c
parenteb5c404b17752ca566947f12cb702438dcccdcb1 (diff)
downloadpostgresql-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/backend/tcop/postgres.c')
-rw-r--r--src/backend/tcop/postgres.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c
index 46b662266b5..dfd52b3c87e 100644
--- a/src/backend/tcop/postgres.c
+++ b/src/backend/tcop/postgres.c
@@ -3718,7 +3718,7 @@ PostgresMain(int argc, char *argv[],
CreateDataDirLockFile(false);
/* read control file (error checking and contains config ) */
- LocalProcessControlFile();
+ LocalProcessControlFile(false);
/* Initialize MaxBackends (if under postmaster, was done already) */
InitializeMaxBackends();