Re: [BUGS] BUG #5878: BTREE_BUILD_STATS causes 'make check' to fail

2011-02-18 Thread Euler Taveira de Oliveira

Em 10-02-2011 09:56, Jan-Peter Seifert escreveu:

However, as long as I have BTREE_BUILD_STATS defined, 'make check' fails on
me with the following message:

It is a bug. The attached patch fixes it. I didn't investigate when it was 
broken; maybe one or two releases ago when someone reorganizes the header 
files. Those debug macros deserve a refactor but nobody bothers to do it yet.



--
  Euler Taveira de Oliveira
  http://www.timbira.com/
diff --git a/src/backend/access/nbtree/nbtree.c b/src/backend/access/nbtree/nbtree.c
index 558ace1..ba01874 100644
*** a/src/backend/access/nbtree/nbtree.c
--- b/src/backend/access/nbtree/nbtree.c
***
*** 31,36 
--- 31,37 
  #include storage/lmgr.h
  #include storage/predicate.h
  #include storage/smgr.h
+ #include tcop/tcopprot.h
  #include utils/memutils.h
  
  
diff --git a/src/backend/access/nbtree/nbtsort.c b/src/backend/access/nbtree/nbtsort.c
index e02f008..fd0e86a 100644
*** a/src/backend/access/nbtree/nbtsort.c
--- b/src/backend/access/nbtree/nbtsort.c
***
*** 70,75 
--- 70,76 
  #include access/nbtree.h
  #include miscadmin.h
  #include storage/smgr.h
+ #include tcop/tcopprot.h
  #include utils/rel.h
  #include utils/tuplesort.h
  

-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs


Re: [BUGS] BUG #5878: BTREE_BUILD_STATS causes 'make check' to fail

2011-02-18 Thread Tom Lane
Euler Taveira de Oliveira eu...@timbira.com writes:
 Em 10-02-2011 09:56, Jan-Peter Seifert escreveu:
 However, as long as I have BTREE_BUILD_STATS defined, 'make check' fails on
 me with the following message:

 It is a bug. The attached patch fixes it. I didn't investigate when it was 
 broken; maybe one or two releases ago when someone reorganizes the header 
 files. Those debug macros deserve a refactor but nobody bothers to do it yet.

Confirmed here, will apply.  I'll bet lunch that it got broken in
Bruce's last remove unnecessary #includes patch --- the process he
uses for that is utterly incapable of dealing with inclusions that
are needed only in certain cases.

regards, tom lane

-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs


[BUGS] BUG #5878: BTREE_BUILD_STATS causes 'make check' to fail

2011-02-10 Thread Jan-Peter Seifert

The following bug has been logged online:

Bug reference:  5878
Logged by:  Jan-Peter Seifert
Email address:  jan-peter.seif...@gmx.de
PostgreSQL version: 8.4.7
Operating system:   Ubuntu 10.04 LTS
Description:BTREE_BUILD_STATS causes 'make check' to fail
Details: 

Hello,

I experimented a bit with compiling PostgreSQL with debug macros.
I set up a Makefile.custom with the following contents:
CFLAGS+=-DLOCK_DEBUG
CFLAGS+=-DBTREE_BUILD_STATS
CFLAGS+=-DWAL_DEBUG

However, as long as I have BTREE_BUILD_STATS defined, 'make check' fails on
me with the following message:
...
btree.c: In function ‘btbuild’:
nbtree.c:100: error: ‘log_btree_build_stats’ undeclared (first use in
this function)
nbtree.c:100: error: (Each undeclared identifier is reported only once
nbtree.c:100: error: for each function it appears in.)
nbtree.c:101: warning: implicit declaration of function ‘ResetUsage’
nbtree.c:146: warning: implicit declaration of function ‘ShowUsage’
...
Without this macro the server seems to install nicely.
Am I just doing something wrongly - I'm not really familiar with gcc?

Thank you very much,

Peter

-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs