pgsql: Avoid holding a directory FD open across pg_ls_dir_files() calls

2020-03-11 Thread Tom Lane
Avoid holding a directory FD open across pg_ls_dir_files() calls. This coding technique is undesirable because (a) it leaks the FD for the rest of the transaction if the SRF is not run to completion, and (b) allocated FDs are a scarce resource, but multiple interleaved uses of the relevant functio

pgsql: Avoid holding a directory FD open across pg_ls_dir_files() calls

2020-03-11 Thread Tom Lane
Avoid holding a directory FD open across pg_ls_dir_files() calls. This coding technique is undesirable because (a) it leaks the FD for the rest of the transaction if the SRF is not run to completion, and (b) allocated FDs are a scarce resource, but multiple interleaved uses of the relevant functio

pgsql: Avoid holding a directory FD open across pg_ls_dir_files() calls

2020-03-11 Thread Tom Lane
Avoid holding a directory FD open across pg_ls_dir_files() calls. This coding technique is undesirable because (a) it leaks the FD for the rest of the transaction if the SRF is not run to completion, and (b) allocated FDs are a scarce resource, but multiple interleaved uses of the relevant functio

pgsql: Avoid holding a directory FD open across pg_ls_dir_files() calls

2020-03-11 Thread Tom Lane
Avoid holding a directory FD open across pg_ls_dir_files() calls. This coding technique is undesirable because (a) it leaks the FD for the rest of the transaction if the SRF is not run to completion, and (b) allocated FDs are a scarce resource, but multiple interleaved uses of the relevant functio