Can't compile with profiling after BRIN autosummarization

Started by Jeff Janesalmost 9 years ago4 messages
#1Jeff Janes
jeff.janes@gmail.com

make maintainer-clean > /dev/null ; ./configure --enable-profiling >
/dev/null && make -j8 >/dev/null

In file included from ipc.c:29:
../../../../src/include/postmaster/autovacuum.h:73: error: expected
declaration specifiers or '...' before 'BlockNumber'
make[4]: *** [ipc.o] Error 1
make[3]: *** [ipc-recursive] Error 2
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [storage-recursive] Error 2
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [all-backend-recurse] Error 2
make: *** [all-src-recurse] Error 2

This git bisects down to:

commit 7526e10224f0792201e99631567bbe44492bbde4
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Date: Sat Apr 1 14:00:53 2017 -0300

BRIN auto-summarization

The lines are:

extern void AutoVacuumRequestWork(AutoVacuumWorkItemType type,
Oid relationId, BlockNumber blkno);

I have no idea why --enable-profiling would change the way this line is
seen.

gcc version 4.4.7 20120313 (Red Hat 4.4.7-17) (GCC)

Cheers,

Jeff

#2Jeff Janes
jeff.janes@gmail.com
In reply to: Jeff Janes (#1)
Re: Can't compile with profiling after BRIN autosummarization

On Mon, Apr 3, 2017 at 9:31 AM, Jeff Janes <jeff.janes@gmail.com> wrote:

make maintainer-clean > /dev/null ; ./configure --enable-profiling >
/dev/null && make -j8 >/dev/null

In file included from ipc.c:29:
../../../../src/include/postmaster/autovacuum.h:73: error: expected
declaration specifiers or '...' before 'BlockNumber'
make[4]: *** [ipc.o] Error 1
make[3]: *** [ipc-recursive] Error 2
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [storage-recursive] Error 2
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [all-backend-recurse] Error 2
make: *** [all-src-recurse] Error 2

This git bisects down to:

commit 7526e10224f0792201e99631567bbe44492bbde4
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Date: Sat Apr 1 14:00:53 2017 -0300

BRIN auto-summarization

The lines are:

extern void AutoVacuumRequestWork(AutoVacuumWorkItemType type,
Oid relationId, BlockNumber blkno);

I have no idea why --enable-profiling would change the way this line is
seen.

gcc version 4.4.7 20120313 (Red Hat 4.4.7-17) (GCC)

A newer gcc gave a better error message which lead me to add the line:

#include "storage/block.h" /* for typedef BlockNumber */

into autovacuum.h, which fixes the problem.

I don't know if that is the correct fix, or why it is only needed under
profiling.

Cheers,

Jeff

#3Alvaro Herrera
alvherre@2ndquadrant.com
In reply to: Jeff Janes (#1)
Re: Can't compile with profiling after BRIN autosummarization

Jeff Janes wrote:

This git bisects down to:

commit 7526e10224f0792201e99631567bbe44492bbde4
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Date: Sat Apr 1 14:00:53 2017 -0300

BRIN auto-summarization

The lines are:

extern void AutoVacuumRequestWork(AutoVacuumWorkItemType type,
Oid relationId, BlockNumber blkno);

Oh, of course: the BlockNumber typedef is not #included by autovacuum.h.
Mea culpa -- will fix.

--
�lvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

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

#4Alvaro Herrera
alvherre@2ndquadrant.com
In reply to: Jeff Janes (#2)
Re: Can't compile with profiling after BRIN autosummarization

Jeff Janes wrote:

A newer gcc gave a better error message which lead me to add the line:

#include "storage/block.h" /* for typedef BlockNumber */

into autovacuum.h, which fixes the problem.

Ah, Peter already fixed it.

--
�lvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

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