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

Commitd307417

Browse files
knizhnikkelvich
authored andcommitted
Minor fixes in pglogical receiver spill buffer
1 parent8b19d36 commitd307417

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

‎multimaster.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2848,9 +2848,9 @@ _PG_init(void)
28482848
&MtmTransSpillThreshold,
28492849
1000,/* 1Gb */
28502850
0,
2851-
INT_MAX,
2851+
(MaxAllocSize-1)/MB,
28522852
PGC_BACKEND,
2853-
0,\
2853+
0,
28542854
NULL,
28552855
NULL,
28562856
NULL

‎multimaster.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070

7171
#defineMULTIMASTER_DEFAULT_ARBITER_PORT 5433
7272

73-
#defineMB (1024*1024L)
73+
#defineMB ((size_t)1024*1024)
7474

7575
#defineUSEC_TO_MSEC(t) ((t)/1000)
7676
#defineMSEC_TO_USEC(t) ((timestamp_t)(t)*1000)

‎pglogical_apply.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1097,7 +1097,7 @@ void MtmExecutor(void* work, size_t size)
10971097
}
10981098
case'(':
10991099
{
1100-
int64size=pq_getmsgint(&s,4);
1100+
size_tsize=pq_getmsgint(&s,4);
11011101
s.data=palloc(size);
11021102
save_cursor=s.cursor;
11031103
save_len=s.len;

‎pglogical_receiver.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -583,6 +583,7 @@ pglogical_receiver_main(Datum main_arg)
583583
}
584584
}elseif (spill_file >=0) {
585585
MtmCloseSpillFile(spill_file);
586+
resetStringInfo(&spill_info);
586587
spill_file=-1;
587588
}
588589
ByteBufferReset(&buf);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp