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

Commit95ef7cd

Browse files
committed
Make RecordTransactionCommit() respect wal_level.
Since the only purpose of WAL-loggin SharedInvalidationMessages is to supportHot Standby operation, they needn't be included when wal_level < hot_standby.Back-patch to 9.0.Review by Heikki Linnakanagas and Fujii Masao.
1 parente4155c8 commit95ef7cd

File tree

1 file changed

+6
-5
lines changed
  • src/backend/access/transam

1 file changed

+6
-5
lines changed

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

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*
1111
*
1212
* IDENTIFICATION
13-
* $PostgreSQL: pgsql/src/backend/access/transam/xact.c,v 1.296 2010/08/12 23:24:53 rhaas Exp $
13+
* $PostgreSQL: pgsql/src/backend/access/transam/xact.c,v 1.297 2010/08/13 15:42:21 rhaas Exp $
1414
*
1515
*-------------------------------------------------------------------------
1616
*/
@@ -915,15 +915,16 @@ RecordTransactionCommit(void)
915915
boolhaveNonTemp;
916916
intnchildren;
917917
TransactionId*children;
918-
intnmsgs;
918+
intnmsgs=0;
919919
SharedInvalidationMessage*invalMessages=NULL;
920-
boolRelcacheInitFileInval;
920+
boolRelcacheInitFileInval= false;
921921

922922
/* Get data needed for commit record */
923923
nrels=smgrGetPendingDeletes(true,&rels,&haveNonTemp);
924924
nchildren=xactGetCommittedChildren(&children);
925-
nmsgs=xactGetCommittedInvalidationMessages(&invalMessages,
926-
&RelcacheInitFileInval);
925+
if (XLogStandbyInfoActive())
926+
nmsgs=xactGetCommittedInvalidationMessages(&invalMessages,
927+
&RelcacheInitFileInval);
927928

928929
/*
929930
* If we haven't been assigned an XID yet, we neither can, nor do we want

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp