Re: moving from contrib to bin

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: moving from contrib to bin
Дата
Msg-id CAB7nPqR9tDZJXoXW0bg=UgmM46q2ux7LtY8nq+ap1O61mW1ceQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: moving from contrib to bin  (Peter Eisentraut <peter_e@gmx.net>)
Ответы Re: moving from contrib to bin  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
On Thu, Mar 12, 2015 at 8:50 AM, Peter Eisentraut wrote:
> On 3/11/15 10:00 AM, Andres Freund wrote:
>> On 2015-03-10 22:06:37 -0300, Alvaro Herrera wrote:
>>> I don't think we care one bit whether these modules use pgxs, at least
>>> not currently.  If we find any issues later on, it should be an easy fix
>>> anyway.
>>
>> I personally find it quite ugly to use pgxs for stuff in
>> src/bin. pgxs.mk says:
>> # This file contains generic rules to build many kinds of simple
>> # extension modules.  You only need to set a few variables and include
>> # this file, the rest will be done here.
>
> Let's get history straight.  pgxs was not initially an external
> extension building framework.  It was a refactoring of our own internal
> makefile rules, because a lot of code under contrib had the same rules
> copy-and-pasted.  It was only much later that it was rebranded for
> external use.  It's debatable why it wasn't expanded to also be used in
> src/bin/, but I attribute that to a combination of boredom, complicated
> special cases under src/bin/, less frequent additions under src/bin/,
> and said rebranding -- not because it would have been a bad idea.
>
> You effectively suggest that we are not allowed to use our own code and
> propose that we undo that refactoring, and then what?  I'll just
> resubmit the same patch from 2001 to refactor it again?
>
>> I don't object at all to introducing more generic rules for src/bin, but
>> that seems like a separate task. And one that should be done right not
>> just use some convenient hack. And you can't tell me that
>> +NO_PGXS = 1
>> +include $(top_srcdir)/src/makefiles/pgxs.mk
>> isn't a hack...
>
> Well, that's unfortunate, but I'd rather live with one line of hack for
> a while that I can easily fix later, instead of writing completely new
> makefiles from scratch.  Who is going to want to debug those, by the
> way?  The turnaround time for makefile changes in this project is one
> month per line, because we can't get anything reviewed across all
> platforms any faster.

Well, TBH, I am on Andres' and Tom's side for this stuff. It feels
that using a PGXS rule like that is a trap for circular dependencies
and I am sure we do not want that. I think as well that we should
involve all the other utilities in src/bin if we do such a
refactoring, so that's definitely a next step, not this one obviously.

Attached is a series of patch rebased on current HEAD, there were some
conflicts after perl-tidying the refactoring patch for MSVC. Note that
this series still uses PGXS in the Makefiles, I am fine to update them
if necessary once this matter is set (already did this stuff upthread
with a previous version).
--
Michael

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Kohei KaiGai
Дата:
Сообщение: Re: One question about security label command
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: Turning off HOT/Cleanup sometimes