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

Commitd40abd5

Browse files
committed
Fix memory allocation mistake
The previous code was allocating more memory than necessary becausethe formula used the wrong data type.Reported-by: Jehan-Guillaume de Rorthais <jgdr@dalibo.com>Discussion:https://www.postgresql.org/message-id/20191105172918.3e32a446@firost
1 parent5b7ba75 commitd40abd5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎src/backend/replication/logical/relation.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ logicalrep_rel_open(LogicalRepRelId remoteid, LOCKMODE lockmode)
267267
*/
268268
desc=RelationGetDescr(entry->localrel);
269269
oldctx=MemoryContextSwitchTo(LogicalRepRelMapContext);
270-
entry->attrmap=palloc(desc->natts*sizeof(int));
270+
entry->attrmap=palloc(desc->natts*sizeof(AttrNumber));
271271
MemoryContextSwitchTo(oldctx);
272272

273273
found=0;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp