1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-18 17:42:25 +03:00

Change PG_DELAY from msec to usec and use it consistenly rather than

select().   Add Win32 Sleep() for delay.
This commit is contained in:
Bruce Momjian
2004-01-09 21:08:50 +00:00
parent a76c86c7c1
commit 38081fd000
4 changed files with 31 additions and 36 deletions

View File

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/access/transam/xact.c,v 1.159 2004/01/07 18:56:24 neilc Exp $
* $PostgreSQL: pgsql/src/backend/access/transam/xact.c,v 1.160 2004/01/09 21:08:46 momjian Exp $
*
* NOTES
* Transaction aborts can now occur two ways:
@ -561,13 +561,7 @@ RecordTransactionCommit(void)
*/
if (CommitDelay > 0 && enableFsync &&
CountActiveBackends() >= CommitSiblings)
{
struct timeval delay;
delay.tv_sec = 0;
delay.tv_usec = CommitDelay;
(void) select(0, NULL, NULL, NULL, &delay);
}
PG_USLEEP(CommitDelay);
XLogFlush(recptr);
}