Re: fsync under win32
От | Bruce Momjian |
---|---|
Тема | Re: fsync under win32 |
Дата | |
Msg-id | 200506161753.j5GHrxG03526@candle.pha.pa.us обсуждение исходный текст |
Ответ на | fsync under win32 (Andreas Pflug <pgadmin@pse-consulting.de>) |
Список | pgsql-patches |
Andreas Pflug wrote: > The latest fsync patch broke win32 build. There's no fsync under win32, > so the #define fsync(fd) _commit(fd) which was removed from port/win32.h > in version 1.45 is still necessary. > > Regards, > Andreas > Index: win32.h > =================================================================== > RCS file: /projects/cvsroot/pgsql/src/include/port/win32.h,v > retrieving revision 1.45 > diff -u -r1.45 win32.h > --- win32.h 20 May 2005 14:53:26 -0000 1.45 > +++ win32.h 16 Jun 2005 13:43:50 -0000 > @@ -19,6 +19,7 @@ > #define HAVE_FSYNC_WRITETHROUGH > #define HAVE_FSYNC_WRITETHROUGH_ONLY > #define ftruncate(a,b) chsize(a,b) > +#define fsync(fd) _commit(fd) > > #define USES_WINSOCK Patch applied, with comment. Thanks. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073 Index: src/include/port/win32.h =================================================================== RCS file: /cvsroot/pgsql/src/include/port/win32.h,v retrieving revision 1.45 diff -c -c -r1.45 win32.h *** src/include/port/win32.h 20 May 2005 14:53:26 -0000 1.45 --- src/include/port/win32.h 16 Jun 2005 17:52:18 -0000 *************** *** 19,24 **** --- 19,29 ---- #define HAVE_FSYNC_WRITETHROUGH #define HAVE_FSYNC_WRITETHROUGH_ONLY #define ftruncate(a,b) chsize(a,b) + /* + * Even though we don't support 'fsync' as a wal_sync_method, + * we do fsync() a few other places where _commit() is just fine. + */ + #define fsync(fd) _commit(fd) #define USES_WINSOCK
В списке pgsql-patches по дате отправления: