Skip to content

Commit 5ac144d

Browse files
committed
Improve messages for too many private files/dirs. Per Alexey Parshin.
1 parent 9340fb8 commit 5ac144d

File tree

1 file changed

+4
-2
lines changed
  • src/backend/storage/file

1 file changed

+4
-2
lines changed

src/backend/storage/file/fd.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1398,7 +1398,8 @@ AllocateFile(const char *name, const char *mode)
13981398
*/
13991399
if (numAllocatedDescs >= MAX_ALLOCATED_DESCS ||
14001400
numAllocatedDescs >= max_safe_fds - 1)
1401-
elog(ERROR, "too many private files demanded");
1401+
elog(ERROR, "exceeded MAX_ALLOCATED_DESCS while trying to open file \"%s\"",
1402+
name);
14021403

14031404
TryAgain:
14041405
if ((file = fopen(name, mode)) != NULL)
@@ -1513,7 +1514,8 @@ AllocateDir(const char *dirname)
15131514
*/
15141515
if (numAllocatedDescs >= MAX_ALLOCATED_DESCS ||
15151516
numAllocatedDescs >= max_safe_fds - 1)
1516-
elog(ERROR, "too many private dirs demanded");
1517+
elog(ERROR, "exceeded MAX_ALLOCATED_DESCS while trying to open directory \"%s\"",
1518+
dirname);
15171519

15181520
TryAgain:
15191521
if ((dir = opendir(dirname)) != NULL)

0 commit comments

Comments
 (0)