Re: [COMMITTERS] pgsql: Remove too-smart-for-its-own-good optimization of not overwriting

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: [COMMITTERS] pgsql: Remove too-smart-for-its-own-good optimization of not overwriting
Дата
Msg-id 603c8f071001041955w5e89395bjd16db8ffd56f5385@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [COMMITTERS] pgsql: Remove too-smart-for-its-own-good optimization of not overwriting  (Greg Stark <gsstark@mit.edu>)
Список pgsql-hackers
On Mon, Jan 4, 2010 at 10:53 PM, Greg Stark <gsstark@mit.edu> wrote:
> On Tue, Jan 5, 2010 at 3:42 AM, Robert Haas <robertmhaas@gmail.com> wrote:
>> On Mon, Jan 4, 2010 at 9:34 PM, Tom Lane <tgl@postgresql.org> wrote:
>>> Log Message:
>>> -----------
>>> Remove too-smart-for-its-own-good optimization of not overwriting the output
>>> files when they haven't changed.  This confuses make because the build fails
>>> to update the file timestamps, and so it keeps on doing the action over again.
>>
>> This doesn't seem like a good idea.  Not rebuilding the output files
>> also saves recompiling the things that depend on them.  For the BKI
>> files thast doesn't matter much, but for schemapg.h it might be
>> significant.  Certainly, if we move to generating more header files
>> this way, it WILL be significant.  If running the script is cheap (and
>> it should be), it's better to take that hit rather than recompiling a
>> whole mess of .c files unnecessarily.
>
>
> I think there's a trick to cover this case but I don't recall what it is.
>
> Does generating a stamp file help? If you had a rule saying to trigger
> generating the output files because the stamp file is out of date
> which might or might not touch the .h file which would trigger more
> files to be rebuilt then everything should work.... except I fear this
> leads us back to the "make rule which generates two files" problem...

The trick being used here was essentially the same as the stamp-file
trick.  But it may not be worth worrying about for the moment since
not too many things depend on schemapg.h.  I fear it will become an
obstacle to further improvements, however.

...Robert


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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: [COMMITTERS] pgsql: Remove too-smart-for-its-own-good optimization of not overwriting
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Re: [COMMITTERS] pgsql: Remove too-smart-for-its-own-good optimization of not overwriting