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

Commit75bb2b6

Browse files
committed
Assume select() might modify struct timeout, so remove previous
optimization.
1 parent447450d commit75bb2b6

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

‎src/backend/postmaster/pgstat.c

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
*
1414
*Copyright (c) 2001-2005, PostgreSQL Global Development Group
1515
*
16-
*$PostgreSQL: pgsql/src/backend/postmaster/pgstat.c,v 1.117 2006/01/0316:42:17 momjian Exp $
16+
*$PostgreSQL: pgsql/src/backend/postmaster/pgstat.c,v 1.118 2006/01/0319:54:08 momjian Exp $
1717
* ----------
1818
*/
1919
#include"postgres.h"
@@ -1870,14 +1870,6 @@ pgstat_recvbuffer(void)
18701870
*/
18711871
msgbuffer= (char*)palloc(PGSTAT_RECVBUFFERSZ);
18721872

1873-
/*
1874-
* Wait for some work to do; but not for more than 10 seconds. (This
1875-
* determines how quickly we will shut down after an ungraceful
1876-
* postmaster termination; so it needn't be very fast.)
1877-
*/
1878-
timeout.tv_sec=10;
1879-
timeout.tv_usec=0;
1880-
18811873
/*
18821874
* Loop forever
18831875
*/
@@ -1918,6 +1910,15 @@ pgstat_recvbuffer(void)
19181910
maxfd=writePipe;
19191911
}
19201912

1913+
/*
1914+
* Wait for some work to do; but not for more than 10 seconds. (This
1915+
* determines how quickly we will shut down after an ungraceful
1916+
* postmaster termination; so it needn't be very fast.) struct timeout
1917+
* is modified by some operating systems.
1918+
*/
1919+
timeout.tv_sec=10;
1920+
timeout.tv_usec=0;
1921+
19211922
if (select(maxfd+1,&rfds,&wfds,NULL,&timeout)<0)
19221923
{
19231924
if (errno==EINTR)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp