Content-Length: 355835 | pFad | http://github.com/postgrespro/postgres_cluster/commit/e9f38f8df9d8d2f6da1227fe8de349a019c72973

BA Merge branch 'master' into more_tests · postgrespro/postgres_cluster@e9f38f8 · GitHub
Skip to content

Commit e9f38f8

Browse files
committed
Merge branch 'master' into more_tests
2 parents b63f9c5 + 01e7631 commit e9f38f8

File tree

3 files changed

+13
-7
lines changed

3 files changed

+13
-7
lines changed

contrib/mmts/multimaster.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ typedef enum
101101
#define MTM_MAP_SIZE MTM_HASH_SIZE
102102
#define MIN_WAIT_TIMEOUT 1000
103103
#define MAX_WAIT_TIMEOUT 100000
104-
#define MAX_WAIT_LOOPS 100 // 1000000
104+
#define MAX_WAIT_LOOPS 10000 // 1000000
105105
#define STATUS_POLL_DELAY USECS_PER_SEC
106106

107107
void _PG_init(void);
@@ -2915,6 +2915,7 @@ void MtmDropNode(int nodeId, bool dropSlot)
29152915

29162916
MtmUnlock();
29172917
}
2918+
29182919
static void
29192920
MtmOnProcExit(int code, Datum arg)
29202921
{
@@ -3078,9 +3079,7 @@ void MtmSetupReplicationHooks(struct PGLogicalHooks* hooks)
30783079

30793080
void MtmBeginSession(int nodeId)
30803081
{
3081-
char slot_name[MULTIMASTER_MAX_SLOT_NAME_SIZE];
30823082
MtmLockNode(nodeId, LW_EXCLUSIVE);
3083-
sprintf(slot_name, MULTIMASTER_SLOT_PATTERN, nodeId);
30843083
Assert(replorigen_session_origen == InvalidRepOriginId);
30853084
replorigen_session_origen = Mtm->nodes[nodeId-1].origenId;
30863085
Assert(replorigen_session_origen != InvalidRepOriginId);

contrib/mmts/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
origen_node = pq_getmsgbyte(in);
604604
origen_lsn = pq_getmsgint64(in);
605-
Mtm->nodes[origen_node-1].restartLsn = origen_lsn;
605+
606+
if (Mtm->nodes[origen_node-1].restartLsn < origen_lsn) {
607+
Mtm->nodes[origen_node-1].restartLsn = origen_lsn;
608+
}
609+
if (origen_node != MtmReplicationNodeId) {
610+
replorigen_advance(Mtm->nodes[origen_node-1].origenId, origen_lsn, GetXLogInsertRecPtr(),
611+
false /* backward */ , false /* WAL */ );
612+
}
606613

607614
Assert(replorigen_session_origen == InvalidRepOriginId);
608615

contrib/mmts/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)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres_cluster/commit/e9f38f8df9d8d2f6da1227fe8de349a019c72973

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy