Re: [HACKERS] contrib/pg_buffercache

2005-03-16 Thread Mark Kirkwood
Andrew Dunstan wrote:
... is apparently broken for Windows and Cygwin. See for example
http://www.pgbuildfarm.org/cgi-bin/show_log.pl?nm=lorisdt=2005-03-16%2001:55:33
Andrew,
The attached patch seems to sort it for me, can you give it try on win32 
and cygwin?

cheers
Mark
--- pg_buffercache_pages.c.orig Sun Mar 13 04:36:24 2005
+++ pg_buffercache_pages.c  Wed Mar 16 20:57:52 2005
@@ -17,6 +17,11 @@
 
 #define NUM_BUFFERCACHE_PAGES_ELEM 6
 
+#ifdef WIN32
+extern DLLIMPORT BufferDesc*BufferDescriptors;
+extern DLLIMPORT volatile uint32   InterruptHoldoffCount;
+#endif
+
 
 /*
  * Record structure holding the to be exposed cache data.

---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]


Re: [HACKERS] contrib/pg_buffercache

2005-03-16 Thread Andrew Dunstan

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.

cheers

andrew

Mark Kirkwood wrote:

 Andrew Dunstan wrote:

 ... is apparently broken for Windows and Cygwin. See for example
 http://www.pgbuildfarm.org/cgi-bin/show_log.pl?nm=lorisdt=2005-03-16%2001:55:33



 Andrew,

 The attached patch seems to sort it for me, can you give it try on
 win32 and cygwin?

 cheers

 Mark



--- pg_buffercache_pages.c.origSun Mar 13 04:36:24 2005
+++ pg_buffercache_pages.c Wed Mar 16 20:57:52 2005
@@ -17,6 +17,11 @@
 
 #define NUM_BUFFERCACHE_PAGES_ELEM6
 
+#ifdef WIN32
+extern DLLIMPORT BufferDesc   *BufferDescriptors;
+extern DLLIMPORT volatile uint32  InterruptHoldoffCount;
+#endif
+
 
 /*
  * Record structure holding the to be exposed cache data.
  




---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
  


---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
  subscribe-nomail command to [EMAIL PROTECTED] so that your
  message can get through to the mailing list cleanly


Re: [HACKERS] contrib/pg_buffercache

2005-03-16 Thread Mark Kirkwood
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.
regards
Mark


*** 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 */


---(end of broadcast)---
TIP 9: the planner will ignore your desire to choose an index scan if your
  joining column's datatypes do not match


Re: [HACKERS] contrib/pg_buffercache

2005-03-16 Thread Andrew Dunstan


Mark Kirkwood wrote:

 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.



You figured correctly.

cheers

andrew

---(end of broadcast)---
TIP 9: the planner will ignore your desire to choose an index scan if your
  joining column's datatypes do not match


Re: [HACKERS] contrib/pg_buffercache

2005-03-16 Thread Mark Kirkwood
Andrew Dunstan wrote:
Mark Kirkwood wrote:

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.


You figured correctly.
Oh, and thanks to your efforts with the automated build system this gets 
picked up now instead of lurking till after release - great work!

cheers
Mark
---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
   (send unregister YourEmailAddressHere to [EMAIL PROTECTED])


[HACKERS] contrib/pg_buffercache

2005-03-15 Thread Andrew Dunstan

... is apparently broken for Windows and Cygwin. See for example
http://www.pgbuildfarm.org/cgi-bin/show_log.pl?nm=lorisdt=2005-03-16%2001:55:33
cheers

andrew



---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
  subscribe-nomail command to [EMAIL PROTECTED] so that your
  message can get through to the mailing list cleanly


Re: [HACKERS] contrib/pg_buffercache

2005-03-15 Thread Mark Kirkwood
Andrew Dunstan wrote:
... is apparently broken for Windows and Cygwin. See for example
http://www.pgbuildfarm.org/cgi-bin/show_log.pl?nm=lorisdt=2005-03-16%2001:55:33
cheers
hmmm - never tried to compile it on win32! I am getting http 502 from 
the above url, so I will have a go at building on win32 tomorrow.

cheers
Mark
---(end of broadcast)---
TIP 9: the planner will ignore your desire to choose an index scan if your
 joining column's datatypes do not match