Re: error out when building pg_xlogdump with pgxs

Lists: pgsql-hackers
From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: error out when building pg_xlogdump with pgxs
Date: 2013-08-27 14:40:35
Message-ID: 20130827144035.GJ24807@alap2.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Hi,

pg_xlogdump cannot properly be built with pgxs since it needs a
sourcetree around. That already has confused some users...

How about the attached patch which will tell it's not supported instead
of an ominous build error about files that have no rules?

Greetings,

Andres Freund

--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

Attachment Content-Type Size
0001-Remove-template-support-for-building-pg_xlogdump-wit.patch text/x-patch 1.2 KB

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Andres Freund <andres(at)2ndquadrant(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: error out when building pg_xlogdump with pgxs
Date: 2013-08-27 18:47:49
Message-ID: 20130827184749.GD4933@eldon.alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Andres Freund wrote:

> pg_xlogdump cannot properly be built with pgxs since it needs a
> sourcetree around. That already has confused some users...
>
> How about the attached patch which will tell it's not supported instead
> of an ominous build error about files that have no rules?

Hmm, the other option is to ignore USE_PGXS completely and build
assuming the source tree is always present. That way, if you build the
whole contrib subdir with USE_PGXS=1, you will end up with all modules
being built, not stop in the middle with an error. This seems more
useful to me. We could just add a comment that USE_PGXS is ignored.

--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services


From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: error out when building pg_xlogdump with pgxs
Date: 2013-08-27 22:12:22
Message-ID: 20130827221222.GC9061@awork2.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Hi Alvaro,

On 2013-08-27 14:47:49 -0400, Alvaro Herrera wrote:
> Andres Freund wrote:
>
> > pg_xlogdump cannot properly be built with pgxs since it needs a
> > sourcetree around. That already has confused some users...
> >
> > How about the attached patch which will tell it's not supported instead
> > of an ominous build error about files that have no rules?
>
> Hmm, the other option is to ignore USE_PGXS completely and build
> assuming the source tree is always present. That way, if you build the
> whole contrib subdir with USE_PGXS=1, you will end up with all modules
> being built, not stop in the middle with an error. This seems more
> useful to me. We could just add a comment that USE_PGXS is ignored.

What's the point in doing USE_PGXS builds with a full and configured
source present? The only thing I can think of is testing that pgxs
builds are working. In that case it doesn't seem helpful to fake
something into working which is then going to fail for real USE_PGXS
builds (where the original sourcetree won't be at that location
anymore).

Maybe I am missing something?

What we could do is something like:
ifdef USE_PGXS
$(warning "pg_xlogdump cannot be built using pgxs)
else

rest of the build rules

endif

i.e. only warn and do nothing if pgxs is specified so you can still do
make USE_PGXS in the contrib directory.

Greetings,

Andres Freund

--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services


From: Cédric Villemain <cedric(at)2ndquadrant(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Cc: Andres Freund <andres(at)2ndquadrant(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Subject: Re: error out when building pg_xlogdump with pgxs
Date: 2013-08-29 09:49:00
Message-ID: 1567138.mGljfHUSvy@obelix
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Le mercredi 28 août 2013 00:12:22 Andres Freund a écrit :
> Hi Alvaro,
>
> On 2013-08-27 14:47:49 -0400, Alvaro Herrera wrote:
> > Andres Freund wrote:
> > > pg_xlogdump cannot properly be built with pgxs since it needs a
> > > sourcetree around. That already has confused some users...
> > >
> > > How about the attached patch which will tell it's not supported instead
> > > of an ominous build error about files that have no rules?
> >
> > Hmm, the other option is to ignore USE_PGXS completely and build
> > assuming the source tree is always present. That way, if you build the
> > whole contrib subdir with USE_PGXS=1, you will end up with all modules
> > being built, not stop in the middle with an error. This seems more
> > useful to me. We could just add a comment that USE_PGXS is ignored.
>
> What's the point in doing USE_PGXS builds with a full and configured
> source present? The only thing I can think of is testing that pgxs
> builds are working. In that case it doesn't seem helpful to fake
> something into working which is then going to fail for real USE_PGXS
> builds (where the original sourcetree won't be at that location
> anymore).

I had the same idea when Peter wished to remove PGXS from the contrib shiped
with postgreSQL.

I've been convinced that if we want to apply testing on pgxs makefile then we
need something dedicated. Not abusing the current options.

I'm in favor of removing PGXS from all contrib makefile, not only this one.

--
Cédric Villemain +33 (0)6 20 30 22 52
http://2ndQuadrant.fr/
PostgreSQL: Support 24x7 - Développement, Expertise et Formation


From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: Cédric Villemain <cedric(at)2ndquadrant(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Subject: Re: error out when building pg_xlogdump with pgxs
Date: 2013-08-29 09:52:36
Message-ID: 20130829095236.GN24807@alap2.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On 2013-08-29 11:49:00 +0200, Cédric Villemain wrote:
> Le mercredi 28 août 2013 00:12:22 Andres Freund a écrit :
> > Hi Alvaro,
> >
> > On 2013-08-27 14:47:49 -0400, Alvaro Herrera wrote:
> > > Andres Freund wrote:
> > > > pg_xlogdump cannot properly be built with pgxs since it needs a
> > > > sourcetree around. That already has confused some users...
> > > >
> > > > How about the attached patch which will tell it's not supported instead
> > > > of an ominous build error about files that have no rules?
> > >
> > > Hmm, the other option is to ignore USE_PGXS completely and build
> > > assuming the source tree is always present. That way, if you build the
> > > whole contrib subdir with USE_PGXS=1, you will end up with all modules
> > > being built, not stop in the middle with an error. This seems more
> > > useful to me. We could just add a comment that USE_PGXS is ignored.
> >
> > What's the point in doing USE_PGXS builds with a full and configured
> > source present? The only thing I can think of is testing that pgxs
> > builds are working. In that case it doesn't seem helpful to fake
> > something into working which is then going to fail for real USE_PGXS
> > builds (where the original sourcetree won't be at that location
> > anymore).
>
> I had the same idea when Peter wished to remove PGXS from the contrib shiped
> with postgreSQL.
>
> I've been convinced that if we want to apply testing on pgxs makefile then we
> need something dedicated. Not abusing the current options.
>
> I'm in favor of removing PGXS from all contrib makefile, not only this one.

Can we please discuss that in another thread? Anything like removing
PGXS wholesale is for sure not going to be something in 9.3 and this
specific issue should be fixed there as it already confused experienced
users.

Greetings,

Andres Freund

--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services


From: Cédric Villemain <cedric(at)2ndquadrant(dot)com>
To: Andres Freund <andres(at)2ndquadrant(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Subject: Re: error out when building pg_xlogdump with pgxs
Date: 2013-08-29 10:11:19
Message-ID: 2218426.68012B22s7@obelix
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Le jeudi 29 août 2013 11:52:36 Andres Freund a écrit :
> On 2013-08-29 11:49:00 +0200, Cédric Villemain wrote:
> > Le mercredi 28 août 2013 00:12:22 Andres Freund a écrit :
> > > Hi Alvaro,
> > >
> > > On 2013-08-27 14:47:49 -0400, Alvaro Herrera wrote:
> > > > Andres Freund wrote:
> > > > > pg_xlogdump cannot properly be built with pgxs since it needs a
> > > > > sourcetree around. That already has confused some users...
> > > > >
> > > > > How about the attached patch which will tell it's not supported
> > > > > instead
> > > > > of an ominous build error about files that have no rules?
> > > >
> > > > Hmm, the other option is to ignore USE_PGXS completely and build
> > > > assuming the source tree is always present. That way, if you build
> > > > the
> > > > whole contrib subdir with USE_PGXS=1, you will end up with all modules
> > > > being built, not stop in the middle with an error. This seems more
> > > > useful to me. We could just add a comment that USE_PGXS is ignored.
> > >
> > > What's the point in doing USE_PGXS builds with a full and configured
> > > source present? The only thing I can think of is testing that pgxs
> > > builds are working. In that case it doesn't seem helpful to fake
> > > something into working which is then going to fail for real USE_PGXS
> > > builds (where the original sourcetree won't be at that location
> > > anymore).
> >
> > I had the same idea when Peter wished to remove PGXS from the contrib
> > shiped with postgreSQL.
> >
> > I've been convinced that if we want to apply testing on pgxs makefile then
> > we need something dedicated. Not abusing the current options.
> >
> > I'm in favor of removing PGXS from all contrib makefile, not only this
> > one.
>
> Can we please discuss that in another thread? Anything like removing
> PGXS wholesale is for sure not going to be something in 9.3 and this
> specific issue should be fixed there as it already confused experienced
> users.

Andres, I was answering your question.
Short and re-phrased:
* we should not abuse make USE_PGXS to test the contrib build
* I believe your patch is correct to issue an error when trying to build
pg_xlogdump with PGXS, it is not possible, dot.

--
Cédric Villemain +33 (0)6 20 30 22 52
http://2ndQuadrant.fr/
PostgreSQL: Support 24x7 - Développement, Expertise et Formation


From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Cédric Villemain <cedric(at)2ndquadrant(dot)com>
Cc: Andres Freund <andres(at)2ndquadrant(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: error out when building pg_xlogdump with pgxs
Date: 2013-10-01 21:06:52
Message-ID: 20131001210652.GK5235@eldon.alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Cédric Villemain wrote:

> Andres, I was answering your question.
> Short and re-phrased:
> * we should not abuse make USE_PGXS to test the contrib build
> * I believe your patch is correct to issue an error when trying to build
> pg_xlogdump with PGXS, it is not possible, dot.

There being no disagreement, I have pushed the original patch.

--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services