mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-10-07 08:36:50 +02:00
Fix memory allocation mistake
The previous code was allocating more memory than necessary because the 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
This commit is contained in:
parent
9ae4bdadf7
commit
39a6210f9e
@ -267,7 +267,7 @@ logicalrep_rel_open(LogicalRepRelId remoteid, LOCKMODE lockmode)
|
||||
*/
|
||||
desc = RelationGetDescr(entry->localrel);
|
||||
oldctx = MemoryContextSwitchTo(LogicalRepRelMapContext);
|
||||
entry->attrmap = palloc(desc->natts * sizeof(int));
|
||||
entry->attrmap = palloc(desc->natts * sizeof(AttrNumber));
|
||||
MemoryContextSwitchTo(oldctx);
|
||||
|
||||
found = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user