Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1a604b4

Browse files
committed
Fix a subtle bug exposed by recent wal_sync_method rearrangements.
Formerly, the default value of wal_sync_method was determined inside xlog.c,but now it is determined inside guc.c. guc.c was reading xlogdefs.hwithout having read <fcntl.h>, leading to wrong determination ofDEFAULT_SYNC_METHOD. Obviously xlogdefs.h needs to include <fcntl.h>for itself to ensure stable results.
1 parent55f6f8f commit1a604b4

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

‎src/backend/access/transam/xlog.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,14 @@
77
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
10-
* $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.310 2008/05/16 19:15:05 tgl Exp $
10+
* $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.311 2008/05/17 17:24:57 tgl Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
1414

1515
#include"postgres.h"
1616

1717
#include<ctype.h>
18-
#include<fcntl.h>
1918
#include<signal.h>
2019
#include<time.h>
2120
#include<sys/stat.h>
@@ -31,7 +30,6 @@
3130
#include"access/twophase.h"
3231
#include"access/xact.h"
3332
#include"access/xlog_internal.h"
34-
#include"access/xlogdefs.h"
3533
#include"access/xlogutils.h"
3634
#include"catalog/catversion.h"
3735
#include"catalog/pg_control.h"

‎src/include/access/xlogdefs.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@
77
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
10-
* $PostgreSQL: pgsql/src/include/access/xlogdefs.h,v 1.21 2008/05/1716:49:23 tgl Exp $
10+
* $PostgreSQL: pgsql/src/include/access/xlogdefs.h,v 1.22 2008/05/1717:24:57 tgl Exp $
1111
*/
1212
#ifndefXLOG_DEFS_H
1313
#defineXLOG_DEFS_H
1414

15+
#include<fcntl.h>/* need open() flags */
16+
1517
/*
1618
* Pointer to a location in the XLOG. These pointers are 64 bits wide,
1719
* because we don't want them ever to overflow.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp