]> granicus.if.org Git - postgresql/commitdiff
Don't forget to flush XLOG_PARAMETER_CHANGE record.
authorFujii Masao <fujii@postgresql.org>
Tue, 25 Mar 2014 17:12:39 +0000 (02:12 +0900)
committerFujii Masao <fujii@postgresql.org>
Tue, 25 Mar 2014 17:14:08 +0000 (02:14 +0900)
Backpatch to 9.0 where XLOG_PARAMETER_CHANGE record was instroduced.

src/backend/access/transam/xlog.c

index 4041ab4051e81fc3174360481a5713abf50ac59a..42ec2fe71de2236c7e6530e10c346e09f21184cb 100644 (file)
@@ -8446,6 +8446,7 @@ XLogReportParameters(void)
                {
                        XLogRecData rdata;
                        xl_parameter_change xlrec;
+                       XLogRecPtr      recptr;
 
                        xlrec.MaxConnections = MaxConnections;
                        xlrec.max_prepared_xacts = max_prepared_xacts;
@@ -8457,7 +8458,8 @@ XLogReportParameters(void)
                        rdata.len = sizeof(xlrec);
                        rdata.next = NULL;
 
-                       XLogInsert(RM_XLOG_ID, XLOG_PARAMETER_CHANGE, &rdata);
+                       recptr = XLogInsert(RM_XLOG_ID, XLOG_PARAMETER_CHANGE, &rdata);
+                       XLogFlush(recptr);
                }
 
                ControlFile->MaxConnections = MaxConnections;