Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
8d09e256
Commit
8d09e256
authored
Feb 04, 2004
by
Jan Wieck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Backing out the background writer sync() option.
Jan
parent
e66fcce6
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
68 deletions
+5
-68
src/backend/storage/buffer/bufmgr.c
src/backend/storage/buffer/bufmgr.c
+1
-50
src/backend/utils/misc/guc.c
src/backend/utils/misc/guc.c
+1
-12
src/backend/utils/misc/postgresql.conf.sample
src/backend/utils/misc/postgresql.conf.sample
+0
-3
src/include/storage/bufmgr.h
src/include/storage/bufmgr.h
+3
-3
No files found.
src/backend/storage/buffer/bufmgr.c
View file @
8d09e256
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/storage/buffer/bufmgr.c,v 1.15
4 2004/01/30 15:57:03 momjian
Exp $
* $PostgreSQL: pgsql/src/backend/storage/buffer/bufmgr.c,v 1.15
5 2004/02/04 01:24:53 wieck
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -55,7 +55,6 @@
...
@@ -55,7 +55,6 @@
#include "storage/proc.h"
#include "storage/proc.h"
#include "storage/smgr.h"
#include "storage/smgr.h"
#include "utils/relcache.h"
#include "utils/relcache.h"
#include "utils/guc.h"
#include "pgstat.h"
#include "pgstat.h"
...
@@ -66,23 +65,9 @@
...
@@ -66,23 +65,9 @@
/* GUC variable */
/* GUC variable */
bool
zero_damaged_pages
=
false
;
bool
zero_damaged_pages
=
false
;
#define BGWRITER_FLUSH_NONE 0
#define BGWRITER_FLUSH_NONE_STR "none"
#define BGWRITER_FLUSH_SYNC 1
#define BGWRITER_FLUSH_SYNC_STR "sync"
#define BGWRITER_FLUSH_DEFAULT BGWRITER_FLUSH_NONE
#define BGWRITER_FLUSH_DEFAULT_STR BGWRITER_FLUSH_NONE_STR
int
BgWriterDelay
=
200
;
int
BgWriterDelay
=
200
;
int
BgWriterPercent
=
1
;
int
BgWriterPercent
=
1
;
int
BgWriterMaxpages
=
100
;
int
BgWriterMaxpages
=
100
;
int
BgWriterFlushMethod
=
BGWRITER_FLUSH_NONE
;
char
*
BgWriterFlushMethod_str
=
NULL
;
const
char
BgWriterFlushMethod_default
[]
=
BGWRITER_FLUSH_DEFAULT_STR
;
const
char
*
BgWriterAssignSyncMethod
(
const
char
*
method
,
bool
doit
,
GucSource
source
);
static
void
WaitIO
(
BufferDesc
*
buf
);
static
void
WaitIO
(
BufferDesc
*
buf
);
static
void
StartBufferIO
(
BufferDesc
*
buf
,
bool
forInput
);
static
void
StartBufferIO
(
BufferDesc
*
buf
,
bool
forInput
);
...
@@ -1041,19 +1026,6 @@ BufferBackgroundWriter(void)
...
@@ -1041,19 +1026,6 @@ BufferBackgroundWriter(void)
if
(
InterruptPending
)
if
(
InterruptPending
)
return
;
return
;
/*
* Perform the configured buffer flush method
*/
switch
(
BgWriterFlushMethod
)
{
case
BGWRITER_FLUSH_NONE
:
break
;
case
BGWRITER_FLUSH_SYNC
:
smgrsync
();
break
;
}
/*
/*
* Nap for the configured time or sleep for 10 seconds if
* Nap for the configured time or sleep for 10 seconds if
* there was nothing to do at all.
* there was nothing to do at all.
...
@@ -1062,27 +1034,6 @@ BufferBackgroundWriter(void)
...
@@ -1062,27 +1034,6 @@ BufferBackgroundWriter(void)
}
}
}
}
const
char
*
BgWriterAssignSyncMethod
(
const
char
*
method
,
bool
doit
,
GucSource
source
)
{
int
new_flush_method
;
if
(
strcasecmp
(
method
,
BGWRITER_FLUSH_NONE_STR
)
==
0
)
new_flush_method
=
BGWRITER_FLUSH_NONE
;
else
if
(
strcasecmp
(
method
,
BGWRITER_FLUSH_SYNC_STR
)
==
0
)
new_flush_method
=
BGWRITER_FLUSH_SYNC
;
else
return
NULL
;
if
(
!
doit
)
return
method
;
BgWriterFlushMethod
=
new_flush_method
;
return
method
;
}
/*
/*
* Do whatever is needed to prepare for commit at the bufmgr and smgr levels
* Do whatever is needed to prepare for commit at the bufmgr and smgr levels
*/
*/
...
...
src/backend/utils/misc/guc.c
View file @
8d09e256
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
* Written by Peter Eisentraut <peter_e@gmx.net>.
* Written by Peter Eisentraut <peter_e@gmx.net>.
*
*
* IDENTIFICATION
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.18
4 2004/02/03 17:34:03 tgl
Exp $
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.18
5 2004/02/04 01:24:53 wieck
Exp $
*
*
*--------------------------------------------------------------------
*--------------------------------------------------------------------
*/
*/
...
@@ -95,8 +95,6 @@ static const char *assign_msglvl(int *var, const char *newval,
...
@@ -95,8 +95,6 @@ static const char *assign_msglvl(int *var, const char *newval,
static
const
char
*
assign_log_error_verbosity
(
const
char
*
newval
,
bool
doit
,
static
const
char
*
assign_log_error_verbosity
(
const
char
*
newval
,
bool
doit
,
GucSource
source
);
GucSource
source
);
static
bool
assign_phony_autocommit
(
bool
newval
,
bool
doit
,
GucSource
source
);
static
bool
assign_phony_autocommit
(
bool
newval
,
bool
doit
,
GucSource
source
);
extern
const
char
*
BgWriterAssignSyncMethod
(
const
char
*
method
,
bool
doit
,
GucSource
source
);
/*
/*
...
@@ -1691,15 +1689,6 @@ static struct config_string ConfigureNamesString[] =
...
@@ -1691,15 +1689,6 @@ static struct config_string ConfigureNamesString[] =
XLOG_sync_method_default
,
assign_xlog_sync_method
,
NULL
XLOG_sync_method_default
,
assign_xlog_sync_method
,
NULL
},
},
{
{
"bgwriter_flush_method"
,
PGC_SIGHUP
,
RESOURCES
,
gettext_noop
(
"Selects the method used by the bgwriter for forcing writes out to disk."
),
NULL
},
&
BgWriterFlushMethod_str
,
BgWriterFlushMethod_default
,
BgWriterAssignSyncMethod
,
NULL
},
/* End-of-list marker */
/* End-of-list marker */
{
{
{
NULL
,
0
,
0
,
NULL
,
NULL
},
NULL
,
NULL
,
NULL
,
NULL
{
NULL
,
0
,
0
,
NULL
,
NULL
},
NULL
,
NULL
,
NULL
,
NULL
...
...
src/backend/utils/misc/postgresql.conf.sample
View file @
8d09e256
...
@@ -61,12 +61,9 @@
...
@@ -61,12 +61,9 @@
#debug_shared_buffers = 0 # 0-600 seconds
#debug_shared_buffers = 0 # 0-600 seconds
# - Background writer -
# - Background writer -
#debug_shared_buffers = 0 # 0-600 seconds interval (0 = off)
#bgwriter_delay = 200 # 10-5000 milliseconds
#bgwriter_delay = 200 # 10-5000 milliseconds
#bgwriter_percent = 1 # 0-100% of dirty buffers
#bgwriter_percent = 1 # 0-100% of dirty buffers
#bgwriter_maxpages = 100 # 1-1000 buffers max at once
#bgwriter_maxpages = 100 # 1-1000 buffers max at once
#bgwriter_flush_method = none # how the bgwriter flushes kernel buffers
# one of: none or sync
# - Free Space Map -
# - Free Space Map -
...
...
src/include/storage/bufmgr.h
View file @
8d09e256
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
* Portions Copyright (c) 1994, Regents of the University of California
*
*
* $PostgreSQL: pgsql/src/include/storage/bufmgr.h,v 1.7
4 2004/01/24 20:00:46
wieck Exp $
* $PostgreSQL: pgsql/src/include/storage/bufmgr.h,v 1.7
5 2004/02/04 01:24:53
wieck Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -31,8 +31,6 @@ extern bool zero_damaged_pages;
...
@@ -31,8 +31,6 @@ extern bool zero_damaged_pages;
extern
int
BgWriterDelay
;
extern
int
BgWriterDelay
;
extern
int
BgWriterPercent
;
extern
int
BgWriterPercent
;
extern
int
BgWriterMaxpages
;
extern
int
BgWriterMaxpages
;
extern
char
*
BgWriterFlushMethod_str
;
extern
const
char
BgWriterFlushMethod_default
[];
/* in buf_init.c */
/* in buf_init.c */
...
@@ -182,6 +180,8 @@ extern void AbortBufferIO(void);
...
@@ -182,6 +180,8 @@ extern void AbortBufferIO(void);
extern
void
BufmgrCommit
(
void
);
extern
void
BufmgrCommit
(
void
);
extern
int
BufferSync
(
int
percent
,
int
maxpages
);
extern
int
BufferSync
(
int
percent
,
int
maxpages
);
extern
void
BufferBackgroundWriter
(
void
);
extern
void
BufferBackgroundWriter
(
void
);
extern
const
char
*
BgWriterAssignSyncMethod
(
const
char
*
method
,
bool
doid
,
bool
interactive
);
extern
void
InitLocalBuffer
(
void
);
extern
void
InitLocalBuffer
(
void
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment