postgresql/src/backend/replication/logical
Tomas Vondra fa73b377ee Close the file descriptor in ApplyLogicalMappingFile
The function was forgetting to close the file descriptor, resulting
in 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:2161

Simply close the file at the end, and backpatch to 9.4 (where logical
decoding was introduced). While at it, fix a nearby typo.

Discussion: https://www.postgresql.org/message-id/flat/738a590a-2ce5-9394-2bef-7b1caad89b37%402ndquadrant.com
2018-08-16 16:49:57 +02:00
..
Makefile Logical replication support for initial data copy 2017-03-23 08:55:37 -04:00
decode.c Revert "Allow on-line enabling and disabling of data checksums" 2018-04-09 19:03:42 +02:00
launcher.c Add subtransaction handling for table synchronization workers. 2018-07-16 17:33:22 -04:00
logical.c Fix logical replication slot initialization 2018-08-01 17:47:15 -04:00
logicalfuncs.c Use a ResourceOwner to track buffer pins in all cases. 2018-07-18 12:15:16 -04:00
message.c Update copyright for 2018 2018-01-02 23:30:12 -05:00
origin.c Reset properly errno before calling write() 2018-08-05 05:31:18 +09:00
proto.c Post-feature-freeze pgindent run. 2018-04-26 14:47:16 -04:00
relation.c logical replication: fix OID type mapping mechanism 2018-03-14 21:34:26 -03:00
reorderbuffer.c Close the file descriptor in ApplyLogicalMappingFile 2018-08-16 16:49:57 +02:00
snapbuild.c Reset properly errno before calling write() 2018-08-05 05:31:18 +09:00
tablesync.c Split the SetSubscriptionRelState function into two 2018-04-06 10:00:26 -04:00
worker.c Set ActiveSnapshot when logically replaying inserts 2018-07-30 16:30:07 -04:00