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

Commit296578f

Browse files
Revoke augmentation of WAL records for btree delete, per discussion.
1 parent9ea9918 commit296578f

File tree

6 files changed

+14
-48
lines changed

6 files changed

+14
-48
lines changed

‎doc/src/sgml/config.sgml

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/config.sgml,v 1.247 2010/01/29 18:39:05 sriggs Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/config.sgml,v 1.248 2010/02/01 13:40:28 sriggs Exp $ -->
22

33
<chapter Id="runtime-config">
44
<title>Server Configuration</title>
@@ -1840,22 +1840,6 @@ archive_command = 'copy "%p" "C:\\server\\archivedir\\%f"' # Windows
18401840
</listitem>
18411841
</varlistentry>
18421842

1843-
<varlistentry id="minimize-standby-conflicts" xreflabel="minimize_standby_conflicts">
1844-
<term><varname>minimize_standby_conflicts</varname> (<type>boolean</type>)</term>
1845-
<indexterm>
1846-
<primary><varname>minimize_standby_conflicts</> configuration parameter</primary>
1847-
</indexterm>
1848-
<listitem>
1849-
<para>
1850-
Generates additional information to the transaction log (WAL) to minimize
1851-
the number of false positive cancelations caused by recovery conflicts on
1852-
a standby server that consumes WAL data from this server.
1853-
There is additional performance cost to enabling this parameter.
1854-
Parameter has no effect during recovery, only in normal running.
1855-
</para>
1856-
</listitem>
1857-
</varlistentry>
1858-
18591843
</variablelist>
18601844
</sect2>
18611845
</sect1>

‎src/backend/access/nbtree/nbtpage.c

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*
1010
*
1111
* IDENTIFICATION
12-
* $PostgreSQL: pgsql/src/backend/access/nbtree/nbtpage.c,v 1.116 2010/01/29 18:39:05 sriggs Exp $
12+
* $PostgreSQL: pgsql/src/backend/access/nbtree/nbtpage.c,v 1.117 2010/02/01 13:40:28 sriggs Exp $
1313
*
1414
*NOTES
1515
* Postgres btree pages look like ordinary relation pages.The opaque
@@ -29,7 +29,6 @@
2929
#include"storage/freespace.h"
3030
#include"storage/indexfsm.h"
3131
#include"storage/lmgr.h"
32-
#include"storage/procarray.h"
3332
#include"utils/inval.h"
3433
#include"utils/snapmgr.h"
3534

@@ -672,18 +671,9 @@ _bt_delitems(Relation rel, Buffer buf,
672671
{
673672
Pagepage=BufferGetPage(buf);
674673
BTPageOpaqueopaque;
675-
TransactionIdlatestRemovedXid=InvalidTransactionId;
676674

677675
Assert(isVacuum||lastBlockVacuumed==0);
678676

679-
/*
680-
* If allowed, calculate an accurate latestRemovedXid, otherwise
681-
* pass InvalidTransactionId which can cause false positive
682-
* conflicts to be assessed when we replay this WAL record.
683-
*/
684-
if (!isVacuum&&XLogStandbyInfoActive()&&MinimizeStandbyConflicts)
685-
latestRemovedXid=GetOldestXmin(false, true);
686-
687677
/* No ereport(ERROR) until changes are logged */
688678
START_CRIT_SECTION();
689679

@@ -731,7 +721,13 @@ _bt_delitems(Relation rel, Buffer buf,
731721
xlrec_delete.node=rel->rd_node;
732722
xlrec_delete.block=BufferGetBlockNumber(buf);
733723

734-
xlrec_delete.latestRemovedXid=latestRemovedXid;
724+
/*
725+
* XXX: We would like to set an accurate latestRemovedXid, but
726+
* there is no easy way of obtaining a useful value. So we punt
727+
* and store InvalidTransactionId, which forces the standby to
728+
* wait for/cancel all currently running transactions.
729+
*/
730+
xlrec_delete.latestRemovedXid=InvalidTransactionId;
735731
rdata[0].data= (char*)&xlrec_delete;
736732
rdata[0].len=SizeOfBtreeDelete;
737733
}

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1996-2010, 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.365 2010/01/29 18:39:05 sriggs Exp $
10+
* $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.366 2010/02/01 13:40:28 sriggs Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -71,7 +71,6 @@ boolXLogArchiveMode = false;
7171
char*XLogArchiveCommand=NULL;
7272
boolXLogRequestRecoveryConnections= true;
7373
intMaxStandbyDelay=30;
74-
boolMinimizeStandbyConflicts= false;
7574
boolfullPageWrites= true;
7675
boollog_checkpoints= false;
7776
intsync_method=DEFAULT_SYNC_METHOD;

‎src/backend/utils/misc/guc.c

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* Written by Peter Eisentraut <peter_e@gmx.net>.
1111
*
1212
* IDENTIFICATION
13-
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.537 2010/01/29 18:39:05 sriggs Exp $
13+
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.538 2010/02/01 13:40:28 sriggs Exp $
1414
*
1515
*--------------------------------------------------------------------
1616
*/
@@ -1222,17 +1222,6 @@ static struct config_bool ConfigureNamesBool[] =
12221222
true,NULL,NULL
12231223
},
12241224

1225-
{
1226-
{"minimize_standby_conflicts",PGC_POSTMASTER,WAL_SETTINGS,
1227-
gettext_noop("Additional information is added to WAL records to"
1228-
" minimize the number of false positive cancelations"
1229-
" caused by recovery conflicts on WAL standby nodes."),
1230-
NULL
1231-
},
1232-
&MinimizeStandbyConflicts,
1233-
false,NULL,NULL
1234-
},
1235-
12361225
{
12371226
{"allow_system_table_mods",PGC_POSTMASTER,DEVELOPER_OPTIONS,
12381227
gettext_noop("Allows modifications of the structure of system tables."),

‎src/backend/utils/misc/postgresql.conf.sample

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -184,9 +184,8 @@
184184
# - Hot Standby -
185185

186186
#recovery_connections = on# allows connections during recovery
187-
#minimize_standby_conflicts = on # additional WAL info to avoid conflicts
188-
#max_standby_delay = 30# max acceptable standby lag (s) to help queries
189-
# complete without conflict; -1 disables
187+
#max_standby_delay = 30# max acceptable standby lag (s) to allow queries
188+
# to complete without conflict; -1 disables
190189

191190
# - Replication -
192191

‎src/include/access/xlog.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
77
* Portions Copyright (c) 1994, Regents of the University of California
88
*
9-
* $PostgreSQL: pgsql/src/include/access/xlog.h,v 1.100 2010/01/29 18:39:05 sriggs Exp $
9+
* $PostgreSQL: pgsql/src/include/access/xlog.h,v 1.101 2010/02/01 13:40:28 sriggs Exp $
1010
*/
1111
#ifndefXLOG_H
1212
#defineXLOG_H
@@ -183,7 +183,6 @@ extern intXLogArchiveTimeout;
183183
externboollog_checkpoints;
184184
externboolXLogRequestRecoveryConnections;
185185
externintMaxStandbyDelay;
186-
externboolMinimizeStandbyConflicts;
187186

188187
#defineXLogArchivingActive()(XLogArchiveMode)
189188
#defineXLogArchiveCommandSet() (XLogArchiveCommand[0] != '\0')

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp