Re: Clarification needed for comment in storage/file/fd.c

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: samuel cherukutty <scherukutty(at)yahoo(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Clarification needed for comment in storage/file/fd.c
Date: 2018-03-16 00:26:33
Message-ID: 20180316002633.GB2666@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Mar 15, 2018 at 11:22:31AM +0000, samuel cherukutty wrote:
> It states that it behaves as native functions with the handle
> registered to the current subtransaction.
> If it is so, why is it intended for short operations?
> Will it work if I open a file at the start of the transaction and
> close it at the end of the transaction?
> What are the side effects/limitations of these functions?

The maximum number of file descriptors can be tuned using
max_files_per_process, however the more concurrent operations you do,
the higher the risk to run out of them. Hence limiting them for
short-time operations it preferred to keep things stable. You actually
never need to hold them that long anyway, and you may want to rethink
what you are doing as well.
--
Michael

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Masahiko Sawada 2018-03-16 00:43:23 Re: Failed to request an autovacuum work-item in silence
Previous Message Alexander Korotkov 2018-03-15 22:27:32 Re: [HACKERS] GSoC 2017: weekly progress reports (week 6)