pgsql: Fix running out of file descriptors for spill files.
От | Amit Kapila |
---|---|
Тема | pgsql: Fix running out of file descriptors for spill files. |
Дата | |
Msg-id | E1imurV-0000KV-Bt@gemulon.postgresql.org обсуждение исходный текст |
Список | pgsql-committers |
Fix running out of file descriptors for spill files. Currently while decoding changes, if the number of changes exceeds a certain threshold, we spill those to disk. And this happens for each (sub)transaction. Now, while reading all these files, we don't close them until we read all the files. While reading these files, if the number of such files exceeds the maximum number of file descriptors, the operation errors out. Use PathNameOpenFile interface to open these files as that internally has the mechanism to release kernel FDs as needed to get us under the max_safe_fds limit. Reported-by: Amit Khandekar Author: Amit Khandekar Reviewed-by: Amit Kapila Backpatch-through: 9.4 Discussion: https://postgr.es/m/CAJ3gD9c-sECEn79zXw4yBnBdOttacoE-6gAyP0oy60nfs_sabQ@mail.gmail.com Branch ------ REL_12_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/f8a6d8e71b177578c4dce78dcf66293c71917844 Modified Files -------------- src/backend/replication/logical/reorderbuffer.c | 76 +++++++++++++++++-------- src/test/recovery/t/006_logical_decoding.pl | 39 ++++++++++++- 2 files changed, 90 insertions(+), 25 deletions(-)
В списке pgsql-committers по дате отправления: