Re: contrib/pg_buffercache

From: Mark Kirkwood
Subject: Re: contrib/pg_buffercache
Date: ,
(view: Whole thread, Raw)
In response to: Re: contrib/pg_buffercache  (Andrew Dunstan)
Responses: Re: contrib/pg_buffercache  (Andrew Dunstan)
List: pgsql-hackers

Tree view

contrib/pg_buffercache  ("Andrew Dunstan", )
 Re: contrib/pg_buffercache  (Mark Kirkwood, )
 Re: contrib/pg_buffercache  (Mark Kirkwood, )
  Re: contrib/pg_buffercache  (Andrew Dunstan, )
   Re: contrib/pg_buffercache  (Mark Kirkwood, )
    Re: contrib/pg_buffercache  (Andrew Dunstan, )
     Re: contrib/pg_buffercache  (Mark Kirkwood, )
 Transitive Closure and 'pg_inherits'  (Ioannis Theoharis, )
  Re: Transitive Closure and 'pg_inherits'  (Tom Lane, )
 Recursive SQL  (Ioannis Theoharis, )
  Re: Recursive SQL  (Euler Taveira de Oliveira, )

Andrew Dunstan wrote:
> It fixes the build error on Windows - haven't tried because i don't have
> time, but I know it won't work on Cygwin, because WIN32 isn't (usually)
> defined on Cygwin - see previous almost endless discussions.

Yes - I recall that discussion a while ago.

This patch should sort the issue.

One question, should I be using defined(__MINGW32__) as opposed to
defined(WIN32)? I figured I didn't as in this case it is not necessary
to distinguish between native and cygwin.



*** pg_buffercache_pages.h.orig    Thu Mar 17 10:12:20 2005
--- pg_buffercache_pages.h    Thu Mar 17 13:44:45 2005
*** 15,18 ****
--- 15,24 ----

  extern Datum pg_buffercache_pages(PG_FUNCTION_ARGS);

+ /* A little hackery for Windows and Cygwin */
+ #if defined (WIN32) || defined (__CYGWIN__)
+ extern DLLIMPORT BufferDesc            *BufferDescriptors;
+ extern DLLIMPORT volatile uint32    InterruptHoldoffCount;
+ #endif
  #endif  /* PG_BUFFERCACHE_PAGES_H */

pgsql-hackers by date:

From: Satoshi Nagayasu
Subject: Re: read-only database
From: Bruce Momjian
Subject: Changing the default wal_sync_method to open_sync for Win32?