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

Commit76be0c8

Browse files
Filter recovery conflicts based upon dboid from relfilenode of WAL
records for heap and btree. Minor change, mostly API changes topass through the required values. This is a simple change thoughalso provides the refactoring required for further enhancementsto conflict processing using the relOid. Changes only have effectduring Hot Standby.
1 parent83fa037 commit76be0c8

File tree

4 files changed

+14
-11
lines changed

4 files changed

+14
-11
lines changed

‎src/backend/access/heap/heapam.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/access/heap/heapam.c,v 1.283 2010/01/20 19:43:40 heikki Exp $
11+
* $PostgreSQL: pgsql/src/backend/access/heap/heapam.c,v 1.284 2010/01/29 17:10:05 sriggs Exp $
1212
*
1313
*
1414
* INTERFACE ROUTINES
@@ -4139,7 +4139,7 @@ heap_xlog_cleanup_info(XLogRecPtr lsn, XLogRecord *record)
41394139
xl_heap_cleanup_info*xlrec= (xl_heap_cleanup_info*)XLogRecGetData(record);
41404140

41414141
if (InHotStandby)
4142-
ResolveRecoveryConflictWithSnapshot(xlrec->latestRemovedXid);
4142+
ResolveRecoveryConflictWithSnapshot(xlrec->latestRemovedXid,xlrec->node);
41434143

41444144
/*
41454145
* Actual operation is a no-op. Record type exists to provide a means
@@ -4171,7 +4171,7 @@ heap_xlog_clean(XLogRecPtr lsn, XLogRecord *record, bool clean_move)
41714171
* no queries running for which the removed tuples are still visible.
41724172
*/
41734173
if (InHotStandby)
4174-
ResolveRecoveryConflictWithSnapshot(xlrec->latestRemovedXid);
4174+
ResolveRecoveryConflictWithSnapshot(xlrec->latestRemovedXid,xlrec->node);
41754175

41764176
RestoreBkpBlocks(lsn,record, true);
41774177

@@ -4241,7 +4241,7 @@ heap_xlog_freeze(XLogRecPtr lsn, XLogRecord *record)
42414241
* consider the frozen xids as running.
42424242
*/
42434243
if (InHotStandby)
4244-
ResolveRecoveryConflictWithSnapshot(cutoff_xid);
4244+
ResolveRecoveryConflictWithSnapshot(cutoff_xid,xlrec->node);
42454245

42464246
RestoreBkpBlocks(lsn,record, false);
42474247

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/access/nbtree/nbtxlog.c,v 1.58 2010/01/14 11:08:00 sriggs Exp $
11+
* $PostgreSQL: pgsql/src/backend/access/nbtree/nbtxlog.c,v 1.59 2010/01/29 17:10:05 sriggs Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -833,7 +833,7 @@ btree_redo(XLogRecPtr lsn, XLogRecord *record)
833833
* here is worth some thought and possibly some effort to
834834
* improve.
835835
*/
836-
ResolveRecoveryConflictWithSnapshot(xlrec->latestRemovedXid);
836+
ResolveRecoveryConflictWithSnapshot(xlrec->latestRemovedXid,xlrec->node);
837837
}
838838

839839
/*

‎src/backend/storage/ipc/standby.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* Portions Copyright (c) 1994, Regents of the University of California
1212
*
1313
* IDENTIFICATION
14-
* $PostgreSQL: pgsql/src/backend/storage/ipc/standby.c,v 1.7 2010/01/23 16:37:12 sriggs Exp $
14+
* $PostgreSQL: pgsql/src/backend/storage/ipc/standby.c,v 1.8 2010/01/29 17:10:05 sriggs Exp $
1515
*
1616
*-------------------------------------------------------------------------
1717
*/
@@ -232,12 +232,12 @@ ResolveRecoveryConflictWithVirtualXIDs(VirtualTransactionId *waitlist,
232232
}
233233

234234
void
235-
ResolveRecoveryConflictWithSnapshot(TransactionIdlatestRemovedXid)
235+
ResolveRecoveryConflictWithSnapshot(TransactionIdlatestRemovedXid,RelFileNodenode)
236236
{
237237
VirtualTransactionId*backends;
238238

239239
backends=GetConflictingVirtualXIDs(latestRemovedXid,
240-
InvalidOid);
240+
node.dbNode);
241241

242242
ResolveRecoveryConflictWithVirtualXIDs(backends,
243243
PROCSIG_RECOVERY_CONFLICT_SNAPSHOT);

‎src/include/storage/standby.h

Lines changed: 5 additions & 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/include/storage/standby.h,v 1.5 2010/01/23 16:37:12 sriggs Exp $
10+
* $PostgreSQL: pgsql/src/include/storage/standby.h,v 1.6 2010/01/29 17:10:05 sriggs Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -16,13 +16,16 @@
1616

1717
#include"access/xlog.h"
1818
#include"storage/lock.h"
19+
#include"storage/relfilenode.h"
1920

2021
externintvacuum_defer_cleanup_age;
2122

2223
externvoidInitRecoveryTransactionEnvironment(void);
2324
externvoidShutdownRecoveryTransactionEnvironment(void);
2425

25-
externvoidResolveRecoveryConflictWithSnapshot(TransactionIdlatestRemovedXid);
26+
externvoidResolveRecoveryConflictWithSnapshot(TransactionIdlatestRemovedXid,
27+
RelFileNodenode);
28+
externvoidResolveRecoveryConflictWithRemovedTransactionId(void);
2629
externvoidResolveRecoveryConflictWithTablespace(Oidtsid);
2730
externvoidResolveRecoveryConflictWithDatabase(Oiddbid);
2831

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp