Lists: | pgsql-hackers |
---|
From: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | htup header reorganization breaks many extension modules |
Date: | 2012-09-26 00:30:59 |
Message-ID: | 1348619459.13797.2.camel@vanquo.pezone.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
I haven't followed the details of the htup header reorganization, but I
have noticed that a number of external extension modules will be broken
because of the move of GETSTRUCT() and to a lesser extent
heap_getattr(). Of course some #ifdefs can fix that, but it seems
annoying to make everyone do that. Maybe this could be reconsidered to
reduce the impact on other projects.
From: | Hitoshi Harada <umi(dot)tanuki(at)gmail(dot)com> |
---|---|
To: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: htup header reorganization breaks many extension modules |
Date: | 2012-09-26 04:08:07 |
Message-ID: | CAP7Qgm=8-7JWb-HfLZzXwzdJGL627Nram6-JQOk7D25q4_HeDw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On Tue, Sep 25, 2012 at 5:30 PM, Peter Eisentraut <peter_e(at)gmx(dot)net> wrote:
> I haven't followed the details of the htup header reorganization, but I
> have noticed that a number of external extension modules will be broken
> because of the move of GETSTRUCT() and to a lesser extent
> heap_getattr(). Of course some #ifdefs can fix that, but it seems
> annoying to make everyone do that. Maybe this could be reconsidered to
> reduce the impact on other projects.
>
But it's only add #include "access/htup_details.h"? I'd not argue
it's harmful unless I missed your point.
Thanks,
--
Hitoshi Harada
From: | "Albe Laurenz" <laurenz(dot)albe(at)wien(dot)gv(dot)at> |
---|---|
To: | "Hitoshi Harada *EXTERN*" <umi(dot)tanuki(at)gmail(dot)com>, "Peter Eisentraut" <peter_e(at)gmx(dot)net> |
Cc: | <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: htup header reorganization breaks many extension modules |
Date: | 2012-09-26 07:14:19 |
Message-ID: | D960CB61B694CF459DCFB4B0128514C20874BDB6@exadv11.host.magwien.gv.at |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Hitoshi Harada wrote:
> On Tue, Sep 25, 2012 at 5:30 PM, Peter Eisentraut <peter_e(at)gmx(dot)net>
wrote:
>> I haven't followed the details of the htup header reorganization, but
I
>> have noticed that a number of external extension modules will be
broken
>> because of the move of GETSTRUCT() and to a lesser extent
>> heap_getattr(). Of course some #ifdefs can fix that, but it seems
>> annoying to make everyone do that. Maybe this could be reconsidered
to
>> reduce the impact on other projects.
> But it's only add #include "access/htup_details.h"? I'd not argue
> it's harmful unless I missed your point.
I guess the point is that you need an #ifdef if you want a module
to be able to build with both 9.3 and lower versions.
Otherwise the compiler will complain about the missing include
file on older versions.
Yours,
Laurenz Albe
From: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com> |
---|---|
To: | Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at> |
Cc: | "Hitoshi Harada *EXTERN*" <umi(dot)tanuki(at)gmail(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: htup header reorganization breaks many extension modules |
Date: | 2012-09-26 08:50:51 |
Message-ID: | CAB7nPqRbr2DE9XmozRvh_WuD6vUmbS_30OYHZD6iTt5r7pCGUg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On Wed, Sep 26, 2012 at 4:14 PM, Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>wrote:
> Hitoshi Harada wrote:
> > On Tue, Sep 25, 2012 at 5:30 PM, Peter Eisentraut <peter_e(at)gmx(dot)net>
> wrote:
> >> I haven't followed the details of the htup header reorganization, but
> I
> >> have noticed that a number of external extension modules will be
> broken
> >> because of the move of GETSTRUCT() and to a lesser extent
> >> heap_getattr(). Of course some #ifdefs can fix that, but it seems
> >> annoying to make everyone do that. Maybe this could be reconsidered
> to
> >> reduce the impact on other projects.
>
> > But it's only add #include "access/htup_details.h"? I'd not argue
> > it's harmful unless I missed your point.
>
> I guess the point is that you need an #ifdef if you want a module
> to be able to build with both 9.3 and lower versions.
>
> Otherwise the compiler will complain about the missing include
> file on older versions.
>
The modules of Postgres depend on the core and not the opposite, so isn't
it the responsability
of the maintainers of the modules to insure that what they make is still
compilable with postgres?
This can be simply fixed by providing, as mentionned, ifdefs controlled by
PG_VERSION_NUM
including htup_details.h, so the correction effort is not that much...
--
Michael Paquier
http://michael.otacoo.com
From: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
---|---|
To: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
Cc: | Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: htup header reorganization breaks many extension modules |
Date: | 2012-09-26 13:42:11 |
Message-ID: | 1348666692-sup-1763@alvh.no-ip.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Excerpts from Peter Eisentraut's message of mar sep 25 21:30:59 -0300 2012:
> I haven't followed the details of the htup header reorganization, but I
> have noticed that a number of external extension modules will be broken
> because of the move of GETSTRUCT() and to a lesser extent
> heap_getattr(). Of course some #ifdefs can fix that, but it seems
> annoying to make everyone do that. Maybe this could be reconsidered to
> reduce the impact on other projects.
Hmm. My original patch didn't have this problem :-( What it did was to
keep htup.h the "everything needed to work on tuples" header; so
external modules would have not become broken. I didn't realize this at
the time, which is why I didn't argue to keep it that way instead of
having the new header contain most innards.
I guess we could rename the headers, so that htup.h is what's now called
htup_details.h, and htup_basics.h for what's currently htup.h. This
would have a lot of fallout in core code, but eliminate impact on
external modules.
That said, I am not really sure that I want to promise header
compatibility forever.
--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Albe Laurenz" <laurenz(dot)albe(at)wien(dot)gv(dot)at> |
Cc: | "Hitoshi Harada *EXTERN*" <umi(dot)tanuki(at)gmail(dot)com>, "Peter Eisentraut" <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: htup header reorganization breaks many extension modules |
Date: | 2012-09-26 14:07:24 |
Message-ID: | 22807.1348668444@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
"Albe Laurenz" <laurenz(dot)albe(at)wien(dot)gv(dot)at> writes:
> Hitoshi Harada wrote:
>> But it's only add #include "access/htup_details.h"? I'd not argue
>> it's harmful unless I missed your point.
> I guess the point is that you need an #ifdef if you want a module
> to be able to build with both 9.3 and lower versions.
I can't get excited about this either. This isn't the first, or the
last, change that add-on modules can expect to have to make to track
newer Postgres versions. If we allow Peter's complaint to become the
new project policy, we'll never be able to make any header
rearrangements at all, nor change any internal APIs.
regards, tom lane
From: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>, Hitoshi Harada *EXTERN* <umi(dot)tanuki(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: htup header reorganization breaks many extension modules |
Date: | 2012-09-26 14:18:51 |
Message-ID: | 50630ECB.4010400@gmx.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On 9/26/12 10:07 AM, Tom Lane wrote:
> I can't get excited about this either. This isn't the first, or the
> last, change that add-on modules can expect to have to make to track
> newer Postgres versions. If we allow Peter's complaint to become the
> new project policy, we'll never be able to make any header
> rearrangements at all, nor change any internal APIs.
I'm not saying we can never change anything about the internal headers,
but we can make a small effort not to create useless annoyances.
That said, could someone clarify the header comments in the new headers?
We currently have
* htup.h
* POSTGRES heap tuple definitions.
* htup_details.h
* POSTGRES heap tuple header definitions.
The names of the headers don't match their documented purpose very much.
Is GETSTRUCT a "detail" of the heap tuple definition, or is it related
to "tuple headers"? It's not really either, but I guess it is related
to tuple headers because you need to know about the headers to get to
the stuff past it.
When I see headers stuff.h and stuff_details.h, it makes me think that
you should only use stuff.h, and stuff_details.h are internal things.
But a lot of external modules use GETSTRUCT, so they might get confused.
From: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
---|---|
To: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>, Hitoshi Harada *EXTERN* <umi(dot)tanuki(at)gmail(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: htup header reorganization breaks many extension modules |
Date: | 2012-09-26 14:31:00 |
Message-ID: | 1348669350-sup-7219@alvh.no-ip.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Excerpts from Peter Eisentraut's message of mié sep 26 11:18:51 -0300 2012:
> On 9/26/12 10:07 AM, Tom Lane wrote:
> > I can't get excited about this either. This isn't the first, or the
> > last, change that add-on modules can expect to have to make to track
> > newer Postgres versions. If we allow Peter's complaint to become the
> > new project policy, we'll never be able to make any header
> > rearrangements at all, nor change any internal APIs.
>
> I'm not saying we can never change anything about the internal headers,
> but we can make a small effort not to create useless annoyances.
I proposed a possible way out of the problem elsewhere. Please comment
on that.
> That said, could someone clarify the header comments in the new headers?
> We currently have
>
> * htup.h
> * POSTGRES heap tuple definitions.
>
> * htup_details.h
> * POSTGRES heap tuple header definitions.
htup.h is what you need if you want to pass tuples around. It's
particularly useful for other headers that want to declare their
functions as receiving or returning tuples. htup_details.h is what you
need if you want to operate on tuples, such as creating them or
examining them.
I guess those comments aren't all that well thought out; suggestions
welcome.
> The names of the headers don't match their documented purpose very much.
> Is GETSTRUCT a "detail" of the heap tuple definition, or is it related
> to "tuple headers"? It's not really either, but I guess it is related
> to tuple headers because you need to know about the headers to get to
> the stuff past it.
> When I see headers stuff.h and stuff_details.h, it makes me think that
> you should only use stuff.h, and stuff_details.h are internal things.
> But a lot of external modules use GETSTRUCT, so they might get confused.
The other proposal was htup_internal.h but that would have been much
more indicative of stuff that's supposed to be used only for internal
consumption of files in backend/access/heap and such, which is why I
stayed away from that name. I think htup_details.h is a good enough
compromise.
--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services