File tree Expand file tree Collapse file tree 2 files changed +4
-7
lines changed Expand file tree Collapse file tree 2 files changed +4
-7
lines changed Original file line number Diff line number Diff line change 88 *
99 *
1010 * IDENTIFICATION
11- * $PostgreSQL: pgsql/src/backend/storage/buffer/bufmgr.c,v 1.153 2004/01/24 20:00:45 wieck Exp $
11+ * $PostgreSQL: pgsql/src/backend/storage/buffer/bufmgr.c,v 1.154 2004/01/30 15:57:03 momjian Exp $
1212 *
1313 *-------------------------------------------------------------------------
1414 */
@@ -1058,10 +1058,7 @@ BufferBackgroundWriter(void)
10581058 * Nap for the configured time or sleep for 10 seconds if
10591059 * there was nothing to do at all.
10601060 */
1061- if (n > 0 )
1062- PG_USLEEP (BgWriterDelay * 1000 );
1063- else
1064- sleep (10 );
1061+ PG_USLEEP ((n > 0 ) ? BgWriterDelay * 1000 : 10000000 );
10651062 }
10661063}
10671064
Original file line number Diff line number Diff line change 1212 * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
1313 * Portions Copyright (c) 1994, Regents of the University of California
1414 *
15- * $PostgreSQL: pgsql/src/include/miscadmin.h,v 1.148 2004/01/26 22:59:53 momjian Exp $
15+ * $PostgreSQL: pgsql/src/include/miscadmin.h,v 1.149 2004/01/30 15:57:04 momjian Exp $
1616 *
1717 * NOTES
1818 * some of the information in this file should be moved to
@@ -109,7 +109,7 @@ do { \
109109#else
110110#define PG_USLEEP (_usec ) \
111111do { \
112- Sleep(( _usec) < 500 ? 1 : ((_usec)+ 500)/ 1000); \
112+ SleepEx((( _usec) < 500 ? 1 : ((_usec) + 500) / 1000), TRUE ); \
113113} while(0)
114114#endif
115115
You can’t perform that action at this time.
0 commit comments