Re: includedir_internal headers are not self-contained

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: includedir_internal headers are not self-contained
Дата
Msg-id 535E6052.3050301@vmware.com
обсуждение исходный текст
Ответ на Re: includedir_internal headers are not self-contained  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: includedir_internal headers are not self-contained  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On 04/28/2014 04:51 PM, Tom Lane wrote:
> Heikki Linnakangas <hlinnakangas@vmware.com> writes:
>> On 04/28/2014 03:29 PM, Christoph Berg wrote:
>>> Re: Heikki Linnakangas 2014-04-28 <535E09B7.3090706@vmware.com>
>>>> I'm using it in the pg_rewind tool. It needs to know how to map relfilenodes
>>>> to physical files.
>
>>> Isn't pg_rewind so low-level server-close that it needs tons of server
>>> headers anyway, including one that would still have relpath()? We are
>>> talking here about what headers pure client apps need.
>
>> It knows how to decode WAL, similar to pg_xlogdump. And it knows about
>> the data directory layout, in particular, how relfilenodes are mapped to
>> physical files. Those are the low-level parts. So, it certainly needs
>> some server headers, but I wouldn't call it tons.
>
> I'm not even worried about which headers this program uses.  What I'm
> worried about is that you've got CATALOG_VERSION_NO compiled into a
> non-server executable.  Is that really such a great idea?  Wouldn't it be
> better if pg_rewind did not depend on that?  (Perhaps it should get the
> database's catalog version out of the pg_control file, for example.)

Sure, that would be better. Although I don't have much hope to make it 
completely version-independent. At the moment, pg_rewind explicitly 
reads the control file (yeah, it knows about that too), and checks that 
the catalog version matches what pg_rewind was compiled with.

- Heikki



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Decrease MAX_BACKENDS to 2^16
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Minor improvements in alter_table.sgml