Re: includedir_internal headers are not self-contained

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: includedir_internal headers are not self-contained
Дата
Msg-id 17799.1398783611@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: includedir_internal headers are not self-contained  (Andrew Dunstan <andrew@dunslane.net>)
Ответы Re: includedir_internal headers are not self-contained  (Heikki Linnakangas <hlinnakangas@vmware.com>)
Список pgsql-hackers
Andrew Dunstan <andrew@dunslane.net> writes:
> On 04/29/2014 02:56 AM, Heikki Linnakangas wrote:
>> On 04/28/2014 10:32 PM, Tom Lane wrote:
>>> Meh.  I still think it's a bad idea to have CATALOG_VERSION_NO getting
>>> compiled into libpgcommon.a, where there will be no way to cross-check
>>> that it matches anything.  But I guess I'm losing this argument.

>> FWIW, I agree it's a bad idea. I just have no better ideas (and 
>> haven't given it much thought anyway).

> Sure sounds like a bad idea.

One idea would be to have relpath.h/.c expose a function (not a #define)
that returns the value of CATALOG_VERSION_NO compiled into it.  Then,
if pg_rewind were to replace all its direct references to
CATALOG_VERSION_NO (including the value it checks against pg_control)
with calls of that function, consistency would be ensured.

A notational problem is that if pg_rewind or similar program is directly
using the TABLESPACE_VERSION_DIRECTORY macro anywhere, this wouldn't
work.  But we could perhaps expose a function to return that string too.
        regards, tom lane



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

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: includedir_internal headers are not self-contained
Следующее
От: Tom Lane
Дата:
Сообщение: Re: pg_dump --pretty-print-views