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
57e08471
Commit
57e08471
authored
Feb 18, 2001
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change default commit_delay to zero, update documentation.
parent
33cc5d8a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
16 deletions
+24
-16
doc/src/sgml/wal.sgml
doc/src/sgml/wal.sgml
+6
-6
src/backend/access/transam/xact.c
src/backend/access/transam/xact.c
+15
-7
src/backend/utils/misc/guc.c
src/backend/utils/misc/guc.c
+2
-2
src/backend/utils/misc/postgresql.conf.sample
src/backend/utils/misc/postgresql.conf.sample
+1
-1
No files found.
doc/src/sgml/wal.sgml
View file @
57e08471
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/wal.sgml,v 1.
1 2001/01/24 23:15:19 petere
Exp $ -->
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/wal.sgml,v 1.
2 2001/02/18 04:50:43 tgl
Exp $ -->
<chapter id="wal">
<title>Write-Ahead Logging (<acronym>WAL</acronym>)</title>
...
...
@@ -290,15 +290,15 @@
</para>
<para>
The <varname>COMMIT_DELAY</varname> parameter defines for how
long
the backend will be forced to sleep after writing a commit record
to the log with <function>LogInsert</function> call
but before
The <varname>COMMIT_DELAY</varname> parameter defines for how
many
microseconds the backend will sleep after writing a commit
record to the log with <function>LogInsert</function>
but before
performing a <function>LogFlush</function>. This delay allows other
backends to add their commit records to the log so as to have all
of them flushed with a single log sync. Unfortunately, this
mechanism is not fully implemented at release 7.1, so there is at
present
no point in changing this parameter from its default value
of 5 microseconds
.
present
usually no benefit to be gained from increasing this parameter
above its default value of zero
.
</para>
</sect1>
</chapter>
...
...
src/backend/access/transam/xact.c
View file @
57e08471
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.9
6 2001/01/24 19:42:51 momjian
Exp $
* $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.9
7 2001/02/18 04:50:43 tgl
Exp $
*
* NOTES
* Transaction aborts can now occur two ways:
...
...
@@ -221,7 +221,7 @@ int XactIsoLevel;
#include "access/xlogutils.h"
int
CommitDelay
=
5
;
/* 1/200000 sec
*/
int
CommitDelay
=
0
;
/* in microseconds
*/
static
void
(
*
_RollbackFunc
)(
void
*
)
=
NULL
;
static
void
*
_RollbackData
=
NULL
;
...
...
@@ -667,7 +667,6 @@ RecordTransactionCommit()
{
XLogRecData
rdata
;
xl_xact_commit
xlrec
;
struct
timeval
delay
;
XLogRecPtr
recptr
;
BufmgrCommit
();
...
...
@@ -686,11 +685,20 @@ RecordTransactionCommit()
/*
* Sleep before commit! So we can flush more than one
* commit records per single fsync.
* commit records per single fsync. (The idea is some other
* backend may do the XLogFlush while we're sleeping. This
* needs work however, because on most Unixen, the minimum
* select() delay is 10msec or more, which is way too long.)
*/
delay
.
tv_sec
=
0
;
delay
.
tv_usec
=
CommitDelay
;
(
void
)
select
(
0
,
NULL
,
NULL
,
NULL
,
&
delay
);
if
(
CommitDelay
>
0
)
{
struct
timeval
delay
;
delay
.
tv_sec
=
0
;
delay
.
tv_usec
=
CommitDelay
;
(
void
)
select
(
0
,
NULL
,
NULL
,
NULL
,
&
delay
);
}
XLogFlush
(
recptr
);
MyLastRecPtr
.
xrecoff
=
0
;
...
...
src/backend/utils/misc/guc.c
View file @
57e08471
...
...
@@ -4,7 +4,7 @@
* Support for grand unified configuration scheme, including SET
* command, configuration file, and command line options.
*
* $Header: /cvsroot/pgsql/src/backend/utils/misc/guc.c,v 1.
29 2001/02/07 23:36:22 vadim
Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/misc/guc.c,v 1.
30 2001/02/18 04:50:43 tgl
Exp $
*
* Copyright 2000 by PostgreSQL Global Development Group
* Written by Peter Eisentraut <peter_e@gmx.net>.
...
...
@@ -291,7 +291,7 @@ ConfigureNamesInt[] =
0
,
0
,
16
},
{
"commit_delay"
,
PGC_USERSET
,
&
CommitDelay
,
5
,
0
,
1
000
},
0
,
0
,
100
000
},
{
NULL
,
0
,
NULL
,
0
,
0
,
0
}
};
...
...
src/backend/utils/misc/postgresql.conf.sample
View file @
57e08471
...
...
@@ -108,7 +108,7 @@
#wal_buffers = 8 # min 4
#wal_files = 0 # range 0-64
#wal_debug = 0 # range 0-16
#commit_delay =
5 # range 0-1
000
#commit_delay =
0 # range 0-100
000
#checkpoint_timeout = 300 # range 30-1800
...
...
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