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
296578fe
Commit
296578fe
authored
Feb 01, 2010
by
Simon Riggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revoke augmentation of WAL records for btree delete, per discussion.
parent
9ea9918e
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
14 additions
and
48 deletions
+14
-48
doc/src/sgml/config.sgml
doc/src/sgml/config.sgml
+1
-17
src/backend/access/nbtree/nbtpage.c
src/backend/access/nbtree/nbtpage.c
+8
-12
src/backend/access/transam/xlog.c
src/backend/access/transam/xlog.c
+1
-2
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
+2
-3
src/include/access/xlog.h
src/include/access/xlog.h
+1
-2
No files found.
doc/src/sgml/config.sgml
View file @
296578fe
<!-- $PostgreSQL: pgsql/doc/src/sgml/config.sgml,v 1.24
7 2010/01/29 18:39:05
sriggs Exp $ -->
<!-- $PostgreSQL: pgsql/doc/src/sgml/config.sgml,v 1.24
8 2010/02/01 13:40:28
sriggs Exp $ -->
<chapter Id="runtime-config">
<title>Server Configuration</title>
...
...
@@ -1840,22 +1840,6 @@ archive_command = 'copy "%p" "C:\\server\\archivedir\\%f"' # Windows
</listitem>
</varlistentry>
<varlistentry id="minimize-standby-conflicts" xreflabel="minimize_standby_conflicts">
<term><varname>minimize_standby_conflicts</varname> (<type>boolean</type>)</term>
<indexterm>
<primary><varname>minimize_standby_conflicts</> configuration parameter</primary>
</indexterm>
<listitem>
<para>
Generates additional information to the transaction log (WAL) to minimize
the number of false positive cancelations caused by recovery conflicts on
a standby server that consumes WAL data from this server.
There is additional performance cost to enabling this parameter.
Parameter has no effect during recovery, only in normal running.
</para>
</listitem>
</varlistentry>
</variablelist>
</sect2>
</sect1>
...
...
src/backend/access/nbtree/nbtpage.c
View file @
296578fe
...
...
@@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/access/nbtree/nbtpage.c,v 1.11
6 2010/01/29 18:39:05
sriggs Exp $
* $PostgreSQL: pgsql/src/backend/access/nbtree/nbtpage.c,v 1.11
7 2010/02/01 13:40:28
sriggs Exp $
*
* NOTES
* Postgres btree pages look like ordinary relation pages. The opaque
...
...
@@ -29,7 +29,6 @@
#include "storage/freespace.h"
#include "storage/indexfsm.h"
#include "storage/lmgr.h"
#include "storage/procarray.h"
#include "utils/inval.h"
#include "utils/snapmgr.h"
...
...
@@ -672,18 +671,9 @@ _bt_delitems(Relation rel, Buffer buf,
{
Page
page
=
BufferGetPage
(
buf
);
BTPageOpaque
opaque
;
TransactionId
latestRemovedXid
=
InvalidTransactionId
;
Assert
(
isVacuum
||
lastBlockVacuumed
==
0
);
/*
* If allowed, calculate an accurate latestRemovedXid, otherwise
* pass InvalidTransactionId which can cause false positive
* conflicts to be assessed when we replay this WAL record.
*/
if
(
!
isVacuum
&&
XLogStandbyInfoActive
()
&&
MinimizeStandbyConflicts
)
latestRemovedXid
=
GetOldestXmin
(
false
,
true
);
/* No ereport(ERROR) until changes are logged */
START_CRIT_SECTION
();
...
...
@@ -731,7 +721,13 @@ _bt_delitems(Relation rel, Buffer buf,
xlrec_delete
.
node
=
rel
->
rd_node
;
xlrec_delete
.
block
=
BufferGetBlockNumber
(
buf
);
xlrec_delete
.
latestRemovedXid
=
latestRemovedXid
;
/*
* XXX: We would like to set an accurate latestRemovedXid, but
* there is no easy way of obtaining a useful value. So we punt
* and store InvalidTransactionId, which forces the standby to
* wait for/cancel all currently running transactions.
*/
xlrec_delete
.
latestRemovedXid
=
InvalidTransactionId
;
rdata
[
0
].
data
=
(
char
*
)
&
xlrec_delete
;
rdata
[
0
].
len
=
SizeOfBtreeDelete
;
}
...
...
src/backend/access/transam/xlog.c
View file @
296578fe
...
...
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.36
5 2010/01/29 18:39:05
sriggs Exp $
* $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.36
6 2010/02/01 13:40:28
sriggs Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -71,7 +71,6 @@ bool XLogArchiveMode = false;
char
*
XLogArchiveCommand
=
NULL
;
bool
XLogRequestRecoveryConnections
=
true
;
int
MaxStandbyDelay
=
30
;
bool
MinimizeStandbyConflicts
=
false
;
bool
fullPageWrites
=
true
;
bool
log_checkpoints
=
false
;
int
sync_method
=
DEFAULT_SYNC_METHOD
;
...
...
src/backend/utils/misc/guc.c
View file @
296578fe
...
...
@@ -10,7 +10,7 @@
* Written by Peter Eisentraut <peter_e@gmx.net>.
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.53
7 2010/01/29 18:39:05
sriggs Exp $
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.53
8 2010/02/01 13:40:28
sriggs Exp $
*
*--------------------------------------------------------------------
*/
...
...
@@ -1222,17 +1222,6 @@ static struct config_bool ConfigureNamesBool[] =
true
,
NULL
,
NULL
},
{
{
"minimize_standby_conflicts"
,
PGC_POSTMASTER
,
WAL_SETTINGS
,
gettext_noop
(
"Additional information is added to WAL records to"
" minimize the number of false positive cancelations"
" caused by recovery conflicts on WAL standby nodes."
),
NULL
},
&
MinimizeStandbyConflicts
,
false
,
NULL
,
NULL
},
{
{
"allow_system_table_mods"
,
PGC_POSTMASTER
,
DEVELOPER_OPTIONS
,
gettext_noop
(
"Allows modifications of the structure of system tables."
),
...
...
src/backend/utils/misc/postgresql.conf.sample
View file @
296578fe
...
...
@@ -184,9 +184,8 @@
# - Hot Standby -
#recovery_connections = on # allows connections during recovery
#minimize_standby_conflicts = on # additional WAL info to avoid conflicts
#max_standby_delay = 30 # max acceptable standby lag (s) to help queries
# complete without conflict; -1 disables
#max_standby_delay = 30 # max acceptable standby lag (s) to allow queries
# to complete without conflict; -1 disables
# - Replication -
...
...
src/include/access/xlog.h
View file @
296578fe
...
...
@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $PostgreSQL: pgsql/src/include/access/xlog.h,v 1.10
0 2010/01/29 18:39:05
sriggs Exp $
* $PostgreSQL: pgsql/src/include/access/xlog.h,v 1.10
1 2010/02/01 13:40:28
sriggs Exp $
*/
#ifndef XLOG_H
#define XLOG_H
...
...
@@ -183,7 +183,6 @@ extern int XLogArchiveTimeout;
extern
bool
log_checkpoints
;
extern
bool
XLogRequestRecoveryConnections
;
extern
int
MaxStandbyDelay
;
extern
bool
MinimizeStandbyConflicts
;
#define XLogArchivingActive() (XLogArchiveMode)
#define XLogArchiveCommandSet() (XLogArchiveCommand[0] != '\0')
...
...
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