Skip to content

Commit 6750490

Browse files
committed
Fix spill to file threshold check
1 parent 63d914f commit 6750490

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

contrib/mmts/multimaster.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -505,6 +505,8 @@ MtmAdjustOldestXid(TransactionId xid)
505505
MtmTransState *ts, *prev = NULL;
506506
int i;
507507

508+
return FirstNormalTransactionId;
509+
508510
MtmLock(LW_EXCLUSIVE);
509511
ts = (MtmTransState*)hash_search(MtmXid2State, &xid, HASH_FIND, NULL);
510512
if (ts != NULL && ts->status == TRANSACTION_STATUS_COMMITTED) {

contrib/mmts/multimaster.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
#define MULTIMASTER_ADMIN "mtm_admin"
4848

4949
#define USEC 1000000
50+
#define MB (1024*1024)
5051

5152
#define USEC_TO_MSEC(t) ((t)/1000)
5253
#define MSEC_TO_USEC(t) ((t)*1000)

contrib/mmts/pglogical_receiver.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ pglogical_receiver_main(Datum main_arg)
449449
{
450450
stmt = copybuf + hdr_len;
451451

452-
if (buf.used >= MtmTransSpillThreshold) {
452+
if (buf.used >= MtmTransSpillThreshold*MB) {
453453
if (spill_file < 0) {
454454
int file_id;
455455
spill_file = MtmCreateSpillFile(nodeId, &file_id);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy