Re: includedir_internal headers are not self-contained

From: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Christoph Berg <cb(at)df7cb(dot)de>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: includedir_internal headers are not self-contained
Date: 2014-04-28 14:06:10
Message-ID: 535E6052.3050301@vmware.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 04/28/2014 04:51 PM, Tom Lane wrote:
> Heikki Linnakangas <hlinnakangas(at)vmware(dot)com> writes:
>> On 04/28/2014 03:29 PM, Christoph Berg wrote:
>>> Re: Heikki Linnakangas 2014-04-28 <535E09B7(dot)3090706(at)vmware(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2014-04-28 14:12:25 Re: Minor improvements in alter_table.sgml
Previous Message Tom Lane 2014-04-28 14:03:58 Re: Decrease MAX_BACKENDS to 2^16