]> 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:12:39 +0000 (02:12 +0900)
Backpatch to 9.0 where XLOG_PARAMETER_CHANGE record was instroduced.

src/backend/access/transam/xlog.c

index 02cb5e50ab20b6a14c827ae3e901fabf8318b1be..b573185122fda459b4c4a0ebe045a7176f24c462 100644 (file)
@@ -8904,6 +8904,7 @@ XLogReportParameters(void)
                {
                        XLogRecData rdata;
                        xl_parameter_change xlrec;
+                       XLogRecPtr      recptr;
 
                        xlrec.MaxConnections = MaxConnections;
                        xlrec.max_worker_processes = max_worker_processes;
@@ -8917,7 +8918,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;