mirror of
https://github.com/postgrespro/pg_probackup.git
synced 2026-06-21 01:34:15 +02:00
[Issue #203] error out if FIO_FDMAX is exceeded in fio_open
This commit is contained in:
+3
-3
@@ -352,6 +352,9 @@ do_backup_instance(PGconn *backup_conn, PGNodeInfo *nodeInfo, bool no_sync)
|
||||
dir_list_file(backup_files_list, parray_get(external_dirs, i),
|
||||
false, true, false, i+1, FIO_DB_HOST);
|
||||
|
||||
/* close ssh session in main thread */
|
||||
fio_disconnect();
|
||||
|
||||
/* Sanity check for backup_files_list, thank you, Windows:
|
||||
* https://github.com/postgrespro/pg_probackup/issues/48
|
||||
*/
|
||||
@@ -526,9 +529,6 @@ do_backup_instance(PGconn *backup_conn, PGNodeInfo *nodeInfo, bool no_sync)
|
||||
arg->ret = 1;
|
||||
}
|
||||
|
||||
/* close ssh session in main thread */
|
||||
fio_disconnect();
|
||||
|
||||
/* Run threads */
|
||||
thread_interrupted = false;
|
||||
elog(INFO, "Start transferring data files");
|
||||
|
||||
+3
-3
@@ -348,9 +348,9 @@ int fio_open(char const* path, int mode, fio_location location)
|
||||
|
||||
mask = fio_fdset;
|
||||
for (i = 0; (mask & 1) != 0; i++, mask >>= 1);
|
||||
if (i == FIO_FDMAX) {
|
||||
return -1;
|
||||
}
|
||||
if (i == FIO_FDMAX)
|
||||
elog(ERROR, "FIO_FDMAX is exceeded, probably too many remote files has been opened");
|
||||
|
||||
hdr.cop = FIO_OPEN;
|
||||
hdr.handle = i;
|
||||
hdr.size = strlen(path) + 1;
|
||||
|
||||
Reference in New Issue
Block a user