Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb8f9afc

Browse files
committed
Distinguish between AcquireExternalFD and epoll_create1 / kqueue failing
The error messages in CreateWaitEventSet() made it hard to know whether thesyscall or AcquireExternalFD() failed. This is particularly relevant becauseAcquireExternalFD() imposes a lower limit than what would cause syscalls failwith EMFILE.I did not change the message in libpqsrv_connect_prepare(), which is the oneother use of AcquireExternalFD() in our codebase, as the error message alreadyis less ambiguous.Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>Discussion:https://postgr.es/m/xjjx7r4xa7beixuu4qtkdhnwdbchrrpo3gaeb3jsbinvvdiat5@cwjw55mna5of
1 parent4ee130c commitb8f9afc

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

‎src/backend/storage/ipc/latch.c

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -811,10 +811,7 @@ CreateWaitEventSet(ResourceOwner resowner, int nevents)
811811

812812
#if defined(WAIT_USE_EPOLL)
813813
if (!AcquireExternalFD())
814-
{
815-
/* treat this as though epoll_create1 itself returned EMFILE */
816-
elog(ERROR,"epoll_create1 failed: %m");
817-
}
814+
elog(ERROR,"AcquireExternalFD, for epoll_create1, failed: %m");
818815
set->epoll_fd=epoll_create1(EPOLL_CLOEXEC);
819816
if (set->epoll_fd<0)
820817
{
@@ -823,10 +820,7 @@ CreateWaitEventSet(ResourceOwner resowner, int nevents)
823820
}
824821
#elif defined(WAIT_USE_KQUEUE)
825822
if (!AcquireExternalFD())
826-
{
827-
/* treat this as though kqueue itself returned EMFILE */
828-
elog(ERROR,"kqueue failed: %m");
829-
}
823+
elog(ERROR,"AcquireExternalFD, for kqueue, failed: %m");
830824
set->kqueue_fd=kqueue();
831825
if (set->kqueue_fd<0)
832826
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp