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

Commit236f81e

Browse files
knizhnikkelvich
authored andcommitted
Temporary disable in-progress check for setting tuple hint bits
1 parent8c63801 commit236f81e

File tree

3 files changed

+13
-7
lines changed

3 files changed

+13
-7
lines changed

‎multimaster.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ typedef enum
100100
#defineMTM_MAP_SIZE MTM_HASH_SIZE
101101
#defineMIN_WAIT_TIMEOUT 1000
102102
#defineMAX_WAIT_TIMEOUT 100000
103-
#defineMAX_WAIT_LOOPS100 // 1000000
103+
#defineMAX_WAIT_LOOPS10000 // 1000000
104104
#defineSTATUS_POLL_DELAY USECS_PER_SEC
105105

106106
void_PG_init(void);
@@ -2914,6 +2914,7 @@ void MtmDropNode(int nodeId, bool dropSlot)
29142914

29152915
MtmUnlock();
29162916
}
2917+
29172918
staticvoid
29182919
MtmOnProcExit(intcode,Datumarg)
29192920
{
@@ -3077,9 +3078,7 @@ void MtmSetupReplicationHooks(struct PGLogicalHooks* hooks)
30773078

30783079
voidMtmBeginSession(intnodeId)
30793080
{
3080-
charslot_name[MULTIMASTER_MAX_SLOT_NAME_SIZE];
30813081
MtmLockNode(nodeId,LW_EXCLUSIVE);
3082-
sprintf(slot_name,MULTIMASTER_SLOT_PATTERN,nodeId);
30833082
Assert(replorigin_session_origin==InvalidRepOriginId);
30843083
replorigin_session_origin=Mtm->nodes[nodeId-1].originId;
30853084
Assert(replorigin_session_origin!=InvalidRepOriginId);

‎pglogical_apply.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,14 @@ process_remote_commit(StringInfo in)
602602

603603
origin_node=pq_getmsgbyte(in);
604604
origin_lsn=pq_getmsgint64(in);
605-
Mtm->nodes[origin_node-1].restartLsn=origin_lsn;
605+
606+
if (Mtm->nodes[origin_node-1].restartLsn<origin_lsn) {
607+
Mtm->nodes[origin_node-1].restartLsn=origin_lsn;
608+
}
609+
if (origin_node!=MtmReplicationNodeId) {
610+
replorigin_advance(Mtm->nodes[origin_node-1].originId,origin_lsn,GetXLogInsertRecPtr(),
611+
false/* backward */ , false/* WAL */ );
612+
}
606613

607614
Assert(replorigin_session_origin==InvalidRepOriginId);
608615

‎tests/run.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
./dtmbench \
2-
-c"dbname=postgres host=localhost port=5432 sslmode=disable" \
3-
-c"dbname=postgres host=localhost port=5433 sslmode=disable" \
4-
-c"dbname=postgres host=localhost port=5434 sslmode=disable" \
2+
-c"dbname=regression host=localhost port=5432 sslmode=disable" \
3+
-c"dbname=regression host=localhost port=5433 sslmode=disable" \
4+
-c"dbname=regression host=localhost port=5434 sslmode=disable" \
55
-n 1000 -a 1000 -w 10 -r 1$*

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp