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

Commitd65bd10

Browse files
committed
switch to GUC_UNIT_KB in size-related vars in mmts
1 parent7123227 commitd65bd10

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

‎multimaster.c

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2036,10 +2036,10 @@ MtmCheckSlots()
20362036
if (slot->in_use
20372037
&&sscanf(slot->data.name.data,MULTIMASTER_SLOT_PATTERN,&nodeId)==1
20382038
&&BIT_CHECK(Mtm->disabledNodeMask,nodeId-1)
2039-
&&slot->data.confirmed_flush+MtmMaxRecoveryLag<GetXLogInsertRecPtr()
2039+
&&slot->data.confirmed_flush+MtmMaxRecoveryLag*1024<GetXLogInsertRecPtr()
20402040
&&slot->data.confirmed_flush!=0)
20412041
{
2042-
MTM_ELOG(WARNING,"Drop slot for node %d which lag %lld is larger than threshold %d",
2042+
MTM_ELOG(WARNING,"Drop slot for node %d which lag %lldBis larger than threshold %d kB",
20432043
nodeId,
20442044
(long64)(GetXLogInsertRecPtr()-slot->data.restart_lsn),
20452045
MtmMaxRecoveryLag);
@@ -2100,7 +2100,7 @@ void MtmCheckRecoveryCaughtUp(int nodeId, lsn_t slotLSN)
21002100
if (MtmIsRecoveredNode(nodeId)) {
21012101
lsn_twalLSN=GetXLogInsertRecPtr();
21022102
if (!BIT_CHECK(Mtm->originLockNodeMask,nodeId-1)
2103-
&&slotLSN+MtmMinRecoveryLag>walLSN)
2103+
&&slotLSN+MtmMinRecoveryLag*1024>walLSN)
21042104
{
21052105
/*
21062106
* Wal sender almost caught up.
@@ -2858,14 +2858,14 @@ _PG_init(void)
28582858
);
28592859
DefineCustomIntVariable(
28602860
"multimaster.trans_spill_threshold",
2861-
"Maximal size(Mb)of transaction after which transaction is written to the disk",
2861+
"Maximal size of transaction after which transaction is written to the disk",
28622862
NULL,
28632863
&MtmTransSpillThreshold,
2864-
100,/* 100Mb */
2865-
0,
2866-
MaxAllocSize/MB,
2867-
PGC_BACKEND,
2864+
100*1024,/* 100Mb */
28682865
0,
2866+
MaxAllocSize/GUC_UNIT_KB,
2867+
PGC_SIGHUP,
2868+
GUC_UNIT_KB,
28692869
NULL,
28702870
NULL,
28712871
NULL
@@ -2892,11 +2892,11 @@ _PG_init(void)
28922892
"When wal-sender almost catch-up WAL current position we need to stop 'Achilles tortile competition' and "
28932893
"temporary stop commit of new transactions until node will be completely repared",
28942894
&MtmMinRecoveryLag,
2895-
100000,
2896-
1,
2897-
INT_MAX,
2898-
PGC_BACKEND,
2895+
10*1024,/* 10 MB */
28992896
0,
2897+
INT_MAX,
2898+
PGC_SIGHUP,
2899+
GUC_UNIT_KB,
29002900
NULL,
29012901
NULL,
29022902
NULL
@@ -2908,11 +2908,11 @@ _PG_init(void)
29082908
"Dropping slot makes it not possible to recover node using logical replication mechanism, it will be ncessary to completely copy content of some other nodes "
29092909
"using basebackup or similar tool. Zero value of parameter disable dropping slot.",
29102910
&MtmMaxRecoveryLag,
2911-
100000000,
2911+
1*1024*1024,/* 1 GB */
29122912
0,
29132913
INT_MAX,
2914-
PGC_BACKEND,
2915-
0,
2914+
PGC_SIGHUP,
2915+
GUC_UNIT_KB,
29162916
NULL,
29172917
NULL,
29182918
NULL

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp