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

Commit5257b9b

Browse files
committed
Close the file descriptor in ApplyLogicalMappingFile
The function was forgetting to close the file descriptor, resultingin failures like this: ERROR: 53000: exceeded maxAllocatedDescs (492) while trying to open file "pg_logical/mappings/map-4000-4eb-1_60DE1E08-5376b5-537c6b" LOCATION: OpenTransientFile, fd.c:2161Simply close the file at the end, and backpatch to 9.4 (where logicaldecoding was introduced). While at it, fix a nearby typo.Discussion:https://www.postgresql.org/message-id/flat/738a590a-2ce5-9394-2bef-7b1caad89b37%402ndquadrant.com
1 parentc2a2e33 commit5257b9b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3328,11 +3328,13 @@ ApplyLogicalMappingFile(HTAB *tuplecid_data, Oid relid, const char *fname)
33283328
new_ent->combocid=ent->combocid;
33293329
}
33303330
}
3331+
3332+
CloseTransientFile(fd);
33313333
}
33323334

33333335

33343336
/*
3335-
* Check whether theTransactionOId 'xid' is in the pre-sorted array 'xip'.
3337+
* Check whether theTransactionOid 'xid' is in the pre-sorted array 'xip'.
33363338
*/
33373339
staticbool
33383340
TransactionIdInArray(TransactionIdxid,TransactionId*xip,Sizenum)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp